Skip to content

Instantly share code, notes, and snippets.

@volkovasystems
Created March 30, 2020 22:04
Show Gist options
  • Save volkovasystems/6a6cffd5055c8a169ae6ac75c4e35d6c to your computer and use it in GitHub Desktop.
Save volkovasystems/6a6cffd5055c8a169ae6ac75c4e35d6c to your computer and use it in GitHub Desktop.
Get Time Stamp Procedure
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