Changeset 14206 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
May 5, 2006, 8:09:59 AM (19 years ago)
Author:
darin
Message:

JavaScriptCore:

  • kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000.

LayoutTests:

  • fast/js/kde/resources/Date.js: Added test cases that George Staikos provided that test dates with day values of 0, 55, and 452.
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r14184 r14206  
     12006-05-05  Darin Adler  <[email protected]>
     2
     3        - http://bugzilla.opendarwin.org/show_bug.cgi?id=8722
     4          IE compatibility fix in date parsing
     5
     6        * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided
     7        from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000.
     8
    192006-05-04  Anders Carlsson  <[email protected]>
    210
  • trunk/JavaScriptCore/kjs/date_object.cpp

    r13824 r14206  
    10201020        return NaN;
    10211021
    1022     if (day < 1)
     1022    if (day < 0)
    10231023        return NaN;
    10241024
     
    10261026    if (day > 31) {
    10271027        // ### where is the boundary and what happens below?
    1028         if (!(*dateString == '/' && day >= 1000))
     1028        if (*dateString != '/')
    10291029            return NaN;
    10301030        // looks like a YYYY/MM/DD date
     
    10421042            return NaN;
    10431043        dateString = newPosStr;
    1044     } else if (*dateString == '/' && day <= 12 && month == -1) {
     1044    } else if (*dateString == '/' && month == -1) {
    10451045        dateString++;
    10461046        // This looks like a MM/DD/YYYY date, not an RFC date.
Note: See TracChangeset for help on using the changeset viewer.