Last active
December 17, 2015 12:28
-
-
Save benashman/5609442 to your computer and use it in GitHub Desktop.
Legit dates, yo.
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
var legitDate = function(y, m, d) { | |
var date = new Date( | |
y + "-" + ("0" + m).slice(-2) + "-" + ("0" + d).slice(-2) | |
); | |
return date; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment