Skip to content

Instantly share code, notes, and snippets.

@bitflower
Created May 7, 2021 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitflower/d4a51ce88ffad65cefa40160c7d564fa to your computer and use it in GitHub Desktop.
Save bitflower/d4a51ce88ffad65cefa40160c7d564fa to your computer and use it in GitHub Desktop.
Best Javascript date parse description

The 2014-03-03T... notation is a fancy JavaScript Date Time String Format and expects a time zone. If you don't provide one, it defaults to Z (UTC).

The 2014-03-03 18:30:00 notation, however, is just a regular string without an interesting name and, if you don't provide a time zone, it assumes local time.

This info was taken from the MDN article about Date.parse().

Link: https://stackoverflow.com/questions/22151477/javascript-iso-8601-string-into-date-object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment