Ignore:
Timestamp:
Feb 1, 2010, 8:56:28 PM (15 years ago)
Author:
[email protected]
Message:

2010-02-01 Kent Tamura <[email protected]>

Reviewed by Darin Adler.

Date.UTC() should apply TimeClip operation.
https://bugs.webkit.org/show_bug.cgi?id=34461

ECMAScript 5 15.9.4.3:

9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).

  • runtime/DateConstructor.cpp: (JSC::dateUTC): Calls WTF::timeClip().

2010-02-01 Kent Tamura <[email protected]>

Reviewed by Darin Adler.

Date.UTC() should apply TimeClip operation.
https://bugs.webkit.org/show_bug.cgi?id=34461

Add tests for corner cases of Date.UTC().

  • fast/js/date-utc-timeclip-expected.txt: Added.
  • fast/js/date-utc-timeclip.html: Added.
  • fast/js/script-tests/date-utc-timeclip.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/DateConstructor.cpp

    r52791 r54199  
    178178    t.second = args.at(5).toInt32(exec);
    179179    double ms = (n >= 7) ? args.at(6).toNumber(exec) : 0;
    180     return jsNumber(exec, gregorianDateTimeToMS(exec, t, ms, true));
     180    return jsNumber(exec, timeClip(gregorianDateTimeToMS(exec, t, ms, true)));
    181181}
    182182
Note: See TracChangeset for help on using the changeset viewer.