Skip to content

Instantly share code, notes, and snippets.

@pixelrevision
Created March 19, 2013 21:42
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 pixelrevision/5200407 to your computer and use it in GitHub Desktop.
Save pixelrevision/5200407 to your computer and use it in GitHub Desktop.
Get a date from a ISO 8601 string in javascript.
var a = dateString.split(/[^0-9]/);
var date = new Date (a[0],a[1]-1,a[2],a[3],a[4],a[5]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment