Title: [104527] trunk
- Revision
- 104527
- Author
- [email protected]
- Date
- 2012-01-09 18:03:22 -0800 (Mon, 09 Jan 2012)
Log Message
Error handling : in ISO8601 timezone
https://bugs.webkit.org/show_bug.cgi?id=75919
Reviewed by Sam Weinig.
Source/_javascript_Core:
* wtf/DateMath.cpp:
(WTF::parseDateFromNullTerminatedCharacters):
- need to increment the string position.
LayoutTests:
* fast/js/date-parse-test-expected.txt:
* fast/js/script-tests/date-parse-test.js:
- added test cases.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (104526 => 104527)
--- trunk/LayoutTests/ChangeLog 2012-01-10 01:56:56 UTC (rev 104526)
+++ trunk/LayoutTests/ChangeLog 2012-01-10 02:03:22 UTC (rev 104527)
@@ -1,3 +1,14 @@
+2012-01-09 Gavin Barraclough <[email protected]>
+
+ Error handling : in ISO8601 timezone
+ https://bugs.webkit.org/show_bug.cgi?id=75919
+
+ Reviewed by Sam Weinig.
+
+ * fast/js/date-parse-test-expected.txt:
+ * fast/js/script-tests/date-parse-test.js:
+ - added test cases.
+
2012-01-09 Mike Lawther <[email protected]>
background position parsing test for CSS3 calc
Modified: trunk/LayoutTests/fast/js/date-parse-test-expected.txt (104526 => 104527)
--- trunk/LayoutTests/fast/js/date-parse-test-expected.txt 2012-01-10 01:56:56 UTC (rev 104526)
+++ trunk/LayoutTests/fast/js/date-parse-test-expected.txt 2012-01-10 02:03:22 UTC (rev 104527)
@@ -208,6 +208,42 @@
PASS Date.parse("Dec 25 1995 13:30 PM GMT") is NaN
PASS Date.parse("DEC 25 1995 13:30 PM GMT") is NaN
PASS Date.parse("dec 25 1995 13:30 pm gmt") is NaN
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+00") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+00") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+00") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+0000") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+0000") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+0000") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+00:00") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+00:00") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+00:00") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+00") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+00") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+00") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+0000") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+0000") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+0000") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+00:00") == 819894600000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+00:00") == 819894600000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+00:00") == 819894600000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+01") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+01") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+01") == 819891000000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+0100") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+0100") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+0100") == 819891000000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM GMT+01:00") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM GMT+01:00") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm gmt+01:00") == 819891000000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+01") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+01") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+01") == 819891000000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+0100") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+0100") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+0100") == 819891000000 is true
+PASS Date.parse("Dec 25 1995 12:30 PM+01:00") == 819891000000 is true
+PASS Date.parse("DEC 25 1995 12:30 PM+01:00") == 819891000000 is true
+PASS Date.parse("dec 25 1995 12:30 pm+01:00") == 819891000000 is true
PASS Date.parse("Anf 25 1995 GMT") is NaN
PASS Date.parse("ANF 25 1995 GMT") is NaN
PASS Date.parse("anf 25 1995 gmt") is NaN
Modified: trunk/LayoutTests/fast/js/script-tests/date-parse-test.js (104526 => 104527)
--- trunk/LayoutTests/fast/js/script-tests/date-parse-test.js 2012-01-10 01:56:56 UTC (rev 104526)
+++ trunk/LayoutTests/fast/js/script-tests/date-parse-test.js 2012-01-10 02:03:22 UTC (rev 104527)
@@ -189,6 +189,20 @@
testDateParse("Dec 25 1995 13:30 AM GMT", "NaN");
testDateParse("Dec 25 1995 13:30 PM GMT", "NaN");
+// Test some ISO 8601 timezones.
+testDateParse("Dec 25 1995 12:30 PM GMT+00", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM GMT+0000", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM GMT+00:00", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM+00", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM+0000", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM+00:00", "819894600000");
+testDateParse("Dec 25 1995 12:30 PM GMT+01", "819891000000");
+testDateParse("Dec 25 1995 12:30 PM GMT+0100", "819891000000");
+testDateParse("Dec 25 1995 12:30 PM GMT+01:00", "819891000000");
+testDateParse("Dec 25 1995 12:30 PM+01", "819891000000");
+testDateParse("Dec 25 1995 12:30 PM+0100", "819891000000");
+testDateParse("Dec 25 1995 12:30 PM+01:00", "819891000000");
+
testDateParse("Anf 25 1995 GMT", "NaN");
testDateParse("Wed Dec 25 1995 1:30 GMT", "819855000000");
Modified: trunk/Source/_javascript_Core/ChangeLog (104526 => 104527)
--- trunk/Source/_javascript_Core/ChangeLog 2012-01-10 01:56:56 UTC (rev 104526)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-01-10 02:03:22 UTC (rev 104527)
@@ -1,3 +1,14 @@
+2012-01-09 Gavin Barraclough <[email protected]>
+
+ Error handling : in ISO8601 timezone
+ https://bugs.webkit.org/show_bug.cgi?id=75919
+
+ Reviewed by Sam Weinig.
+
+ * wtf/DateMath.cpp:
+ (WTF::parseDateFromNullTerminatedCharacters):
+ - need to increment the string position.
+
2012-01-09 Mark Rowe <[email protected]>
_javascript_Core executable targets shouldn't explicitly depend on the _javascript_Core framework target
Modified: trunk/Source/_javascript_Core/wtf/DateMath.cpp (104526 => 104527)
--- trunk/Source/_javascript_Core/wtf/DateMath.cpp 2012-01-10 01:56:56 UTC (rev 104526)
+++ trunk/Source/_javascript_Core/wtf/DateMath.cpp 2012-01-10 02:03:22 UTC (rev 104527)
@@ -961,6 +961,7 @@
else
offset = o * 60 * sgn;
} else { // GMT+05:00
+ ++dateString; // skip the ':'
long o2;
if (!parseLong(dateString, &newPosStr, 10, &o2))
return std::numeric_limits<double>::quiet_NaN();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes