jquery/build/tasks/lib/getTimestamp.js

10 lines
325 B
JavaScript
Raw Normal View History

"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 }`;
};