Last active
March 30, 2020 22:03
-
-
Save volkovasystems/fb3a4236c5469f686b218b2e58d375ba to your computer and use it in GitHub Desktop.
Get Date Stamp Procedure
This file contains hidden or 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 getDateStamp = ( | |
function getDateStamp( ){ | |
const dateNowObject = ( | |
new Date( ) | |
); | |
return ( | |
[ | |
( | |
dateNowObject | |
.getFullYear( ) | |
), | |
( | |
( | |
dateNowObject | |
.getUTCMonth( ) | |
+ 1 | |
) | |
.toString( ) | |
.padStart( | |
2, | |
"0" | |
) | |
), | |
( | |
dateNowObject | |
.getUTCDate( ) | |
.toString( ) | |
.padStart( | |
2, | |
"0" | |
) | |
) | |
] | |
.join( | |
"" | |
) | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment