Skip to content

Instantly share code, notes, and snippets.

@remzmike
Created June 16, 2017 15:02
Show Gist options
  • Save remzmike/0cc5a5b2abd7efa6dc8e529ffd401d02 to your computer and use it in GitHub Desktop.
Save remzmike/0cc5a5b2abd7efa6dc8e529ffd401d02 to your computer and use it in GitHub Desktop.
javascript dates in 2017 lol
new Date(2017,04,01)
// Mon May 01 2017 00:00:00 GMT-0400 (Eastern Daylight Time)
new Date("2017-04-01")
// Fri Mar 31 2017 20:00:00 GMT-0400 (Eastern Daylight Time)
new Date("2017","04","1")
// Mon May 01 2017 00:00:00 GMT-0400 (Eastern Daylight Time)
new Date("2017",4,"01");
// Mon May 01 2017 00:00:00 GMT-0400 (Eastern Daylight Time)
new Date("2017",3,"01");
// Sat Apr 01 2017 00:00:00 GMT-0400 (Eastern Daylight Time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment