From: Dan Vanderkam Date: Tue, 3 Jan 2012 15:24:45 +0000 (-0500) Subject: FF3.5 does not support ISO8601 date format. X-Git-Tag: v1.0.0~382 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=3438387b31dda65c811a916df21d11c9b3ed9b47;p=dygraphs.git FF3.5 does not support ISO8601 date format. --- diff --git a/auto_tests/tests/date_formats.js b/auto_tests/tests/date_formats.js index 27ddadb..d0e419a 100644 --- a/auto_tests/tests/date_formats.js +++ b/auto_tests/tests/date_formats.js @@ -15,7 +15,12 @@ dateFormatsTestCase.prototype.testISO8601 = function() { // Format: YYYY-MM-DDTHH:MM:SS.ddddddZ // The "Z" indicates UTC, so this test should pass regardless of the time // zone of the machine on which it is run. - assertEquals(946816496789, Dygraph.dateParser("2000-01-02T12:34:56.789012Z")); + + // Firefox <4 does not support this format: + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse + if (new Date("2000-01-02T12:34:56.789012Z")) { + assertEquals(946816496789, Dygraph.dateParser("2000-01-02T12:34:56.789012Z")); + } }; dateFormatsTestCase.prototype.testHyphenatedDate = function() {