jquery/build/tasks/lib/getTimestamp.js
Michał Gołębiowski-Owczarek e84886aa37
Build: Update ESLint-related packages, fix linting errors (3.x version)
The main change is the new rule in `eslint-config-jquery`:
`template-curly-spacing`.

Closes gh-5348
Ref jquery/eslint-config-jquery#21
Ref gh-5347
2023-11-02 00:48:05 +01:00

10 lines
325 B
JavaScript

"use strict";
module.exports = function getTimestamp() {
const now = new Date();
const hours = now.getHours().toString().padStart( 2, "0" );
const minutes = now.getMinutes().toString().padStart( 2, "0" );
const seconds = now.getSeconds().toString().padStart( 2, "0" );
return `${ hours }:${ minutes }:${ seconds }`;
};