Created
March 30, 2020 22:04
-
-
Save volkovasystems/6a6cffd5055c8a169ae6ac75c4e35d6c to your computer and use it in GitHub Desktop.
Get Time Stamp Procedure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getTimeStamp = ( | |
function getTimeStamp( ){ | |
const dateNowObject = ( | |
new Date( ) | |
); | |
return ( | |
[ | |
( | |
dateNowObject | |
.getUTCHours( ) | |
.toString( ) | |
.padStart( | |
2, | |
"0" | |
) | |
), | |
( | |
dateNowObject | |
.getUTCMinutes( ) | |
.toString( ) | |
.padStart( | |
2, | |
"0" | |
) | |
), | |
( | |
dateNowObject | |
.getUTCSeconds( ) | |
.toString( ) | |
.padStart( | |
2, | |
"0" | |
) | |
) | |
] | |
.join( | |
"" | |
) | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment