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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.