Changeset 79060 in webkit


Ignore:
Timestamp:
Feb 18, 2011 5:43:40 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-18 chris reiss <christopher.reiss@nokia.com>

Reviewed by Andreas Kling.

REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
https://bugs.webkit.org/show_bug.cgi?id=49989

  • fast/js/date-parse-test-expected.txt:
  • fast/js/script-tests/date-parse-test.js:

2011-02-18 chris reiss <christopher.reiss@nokia.com>

Reviewed by Andreas Kling.

REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
https://bugs.webkit.org/show_bug.cgi?id=49989

updated test fast/js/script-tests/date-parse-test.js

  • wtf/DateMath.cpp: (WTF::parseDateFromNullTerminatedCharacters):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r79049 r79060  
     12011-02-18  chris reiss  <christopher.reiss@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
     6        https://bugs.webkit.org/show_bug.cgi?id=49989
     7
     8        * fast/js/date-parse-test-expected.txt:
     9        * fast/js/script-tests/date-parse-test.js:
     10
    1112011-02-18  Emil A Eklund  <eae@chromium.org>
    212
  • trunk/LayoutTests/fast/js/date-parse-test-expected.txt

    r69833 r79060  
    162162PASS Date.parse("WED DEC 25 1995 1:30 GMT") == 819855000000 is true
    163163PASS Date.parse("wed dec 25 1995 1:30 gmt") == 819855000000 is true
     164PASS Date.parse("Wed Dec 25 1:30 1995 GMT") == 819855000000 is true
     165PASS Date.parse("WED DEC 25 1:30 1995 GMT") == 819855000000 is true
     166PASS Date.parse("wed dec 25 1:30 1995 gmt") == 819855000000 is true
     167PASS Date.parse("Wed Dec 25 1:30 1995GMT") == 819855000000 is true
     168PASS Date.parse("Wed Dec 25 1:30 1995 2010 GMT") is NaN
     169PASS Date.parse("Wed Dec 25 1:30 1995r GMT") is NaN
     170PASS Date.parse("Wed 1:30 Dec 25 GMT") is NaN
    164171PASS Date.parse("Dec 25" + String.fromCharCode(9) + "1995 13:30 GMT") == 819898200000 is true
    165172PASS Date.parse(("Dec 25" + String.fromCharCode(9) + "1995 13:30 GMT").toUpperCase()) == 819898200000 is true
  • trunk/LayoutTests/fast/js/script-tests/date-parse-test.js

    r69833 r79060  
    128128
    129129testDateParse("Wed Dec 25 1995 1:30 GMT", "819855000000");
     130testDateParse("Wed Dec 25 1:30 1995 GMT", "819855000000");
     131testDateParseExact("Wed Dec 25 1:30 1995GMT", "819855000000");
     132testDateParseExact("Wed Dec 25 1:30 1995 2010 GMT", "NaN");
     133testDateParseExact("Wed Dec 25 1:30 1995r GMT", "NaN");
     134testDateParseExact("Wed 1:30 Dec 25 GMT", "NaN");
    130135
    131136testDateParseExpr('"Dec 25" + String.fromCharCode(9) + "1995 13:30 GMT"', "819898200000");
     
    142147testDateParse("Dec 25,1995,13:30", "819898200000 + timeZoneOffset");
    143148
     149
     150
    144151var successfullyParsed = true;
  • trunk/Source/JavaScriptCore/ChangeLog

    r79037 r79060  
     12011-02-18  chris reiss  <christopher.reiss@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
     6        https://bugs.webkit.org/show_bug.cgi?id=49989
     7
     8        updated test fast/js/script-tests/date-parse-test.js
     9
     10        * wtf/DateMath.cpp:
     11        (WTF::parseDateFromNullTerminatedCharacters):
     12
    1132011-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/Source/JavaScriptCore/wtf/DateMath.cpp

    r74424 r79060  
    921921        }
    922922    }
     923   
     924    // The year may be after the time but before the time zone.
     925    if (year <= 0) {
     926       if (!parseLong(dateString, &newPosStr, 10, &year))
     927          year = 0;
     928       dateString = newPosStr;
     929       skipSpacesAndComments(dateString);
     930    }
    923931
    924932    // Don't fail if the time zone is missing.
Note: See TracChangeset for help on using the changeset viewer.