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

Closes gh-5347
Ref jquery/eslint-config-jquery#21
Ref gh-5348
2023-11-02 00:48:50 +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 }`;
};