Permalink
Browse files

Only shim when Date.parse is absent or can't handle ISO dates

  • Loading branch information...
ljharb committed Feb 16, 2014
1 parent 2b6b24c commit 6dc009a209a5de06b763770cc4efa8590f7ecd0d
Showing with 1 addition and 1 deletion.
  1. +1 −1 es5-shim.js
View
@@ -829,7 +829,7 @@ if (!dateToJSONIsSupported) {
// http://es5.github.com/#x15.9.4.2
// based on work shared by Daniel Friesen (dantman)
// http://gist.github.com/303249
-if (!Date.parse || "Date.parse is buggy") {
+if (!Date.parse || isNaN(Date.parse("2000-01-01T00:00:00.000Z"))) {
// XXX global assignment won't work in embeddings that use
// an alternate object for the context.
Date = (function(NativeDate) {

0 comments on commit 6dc009a

Please sign in to comment.