Skip to content

Instantly share code, notes, and snippets.

@roylory
Created April 24, 2015 21:37
Show Gist options
  • Save roylory/5eaeb8afc73145d9091a to your computer and use it in GitHub Desktop.
Save roylory/5eaeb8afc73145d9091a to your computer and use it in GitHub Desktop.
UTC Date String Comparison
console.log("2015-03-16T21:29:54.23Z" > "2015-03-16T21:13:58.303Z") // expects true
console.log("2015-03-16T21:29:54.23Z" < "2015-03-16T21:13:58.303Z") // expects false
console.log("2015-03-16T21:13:58.303Z" > "2015-03-16T21:29:54.23Z") // expects false
console.log("2015-03-16T21:13:58.303Z" < "2015-03-16T21:29:54.23Z") // expects true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment