Created
April 29, 2009 19:34
-
-
Save lsmith/104008 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function parseISO8601(str) { | |
return new Date(str.replace(/-/,"/"). | |
replace(/-/,"/"). | |
replace(/T/," "). | |
replace(/Z/," UTC"). | |
replace(/([\+-]\d\d)\:?(\d\d)/," $1$2")); // -04:00 -> -0400 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment