Skip to content

Instantly share code, notes, and snippets.

@benashman
Last active December 17, 2015 12:28
Show Gist options
  • Save benashman/5609442 to your computer and use it in GitHub Desktop.
Save benashman/5609442 to your computer and use it in GitHub Desktop.
Legit dates, yo.
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