diff options
Diffstat (limited to 'build/tasks/lib/getTimestamp.js')
-rw-r--r-- | build/tasks/lib/getTimestamp.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/tasks/lib/getTimestamp.js b/build/tasks/lib/getTimestamp.js new file mode 100644 index 000000000..c3c8aed11 --- /dev/null +++ b/build/tasks/lib/getTimestamp.js @@ -0,0 +1,9 @@ +"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}`; +}; |