Skip to content

Commit

Permalink
Add a failing runtime check for Safari Date.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 4, 2015
1 parent a534625 commit 178d1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es5-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ if (!dateToJSONIsSupported) {
// based on work shared by Daniel Friesen (dantman)
// http://gist.github.com/303249
var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15;
var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z'));
var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z'));
var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z'));
if (!Date.parse || doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {
// XXX global assignment won't work in embeddings that use
Expand Down

0 comments on commit 178d1b5

Please sign in to comment.