Created
January 15, 2015 17:55
-
-
Save dbrugne/84cb2845b10dc5fe4c70 to your computer and use it in GitHub Desktop.
Javascript full date and time string
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
// "20150115185533114" | |
var d = new Date(); | |
var date = ''+d.getFullYear()+('0'+(d.getMonth()+1)).substr(-2, 2)+('0'+(d.getDate())).substr(-2, 2)+d.getHours()+d.getMinutes()+d.getSeconds()+d.getMilliseconds(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment