From 3438387b31dda65c811a916df21d11c9b3ed9b47 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 3 Jan 2012 10:24:45 -0500 Subject: [PATCH] FF3.5 does not support ISO8601 date format. --- auto_tests/tests/date_formats.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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() { -- 2.7.4