Changeset 20203 in webkit for trunk/JavaScriptCore/kjs/DateMath.h


Ignore:
Timestamp:
Mar 14, 2007, 7:21:47 PM (18 years ago)
Author:
kmccullo
Message:

JavaScriptCore:

Reviewed by Geoff.

  • rdar://problem/5045720
  • DST changes in US affect JavaScript date calculations (12975) This fix was to ensure we properly test for the new changes to DST in the US. Also this fixes when we apply DST, now we correctly map most past years to current DST rules. We still have a small issue with years before 1900 or after 2100. rdar://problem/5055038
  • kjs/DateMath.cpp: Fix DST to match spec better. (KJS::getCurrentUTCTime): (KJS::mimimumYearForDST): (KJS::maximumYearForDST): (KJS::equivalentYearForDST): (KJS::getDSTOffset):
  • kjs/DateMath.h: Consolodated common funtionality.
  • kjs/date_object.cpp: Consolodated common functionality. (KJS::formatLocaleDate): (KJS::DateObjectImp::construct):
  • tests/mozilla/ecma/jsref.js: Added functions for finding the correct days when DST starts and ends.
  • tests/mozilla/ecma/shell.js: Added back in the old DST functions for ease of merging with mozilla if needed.
  • tests/mozilla/ecma_2/jsref.js: Added functions for finding the correct days when DST starts and ends.
  • tests/mozilla/ecma_3/Date/shell.js: Added functions for finding the correct days when DST starts and ends.
  • tests/mozilla/expected.html: Updated to show all date tests passing.

LayoutTests:

Reviewed by Geoff.

  • rdar://problem/5045720
  • DST changes in US affect JavaScript date calculations (12975) Changed layout tests to properly check for the new changes to DST in the US. Also these now test that equivalent years return the same results for DST.
  • fast/js/date-DST-time-cusps-expected.txt:
  • fast/js/date-big-setdate-expected.txt:
  • fast/js/resources/date-DST-time-cusps.js:
  • fast/js/resources/date-big-setdate.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/DateMath.h

    r19945 r20203  
    5454double getUTCOffset();
    5555int equivalentYearForDST(int year);
     56double getCurrentUTCTime();
    5657
    5758const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
Note: See TracChangeset for help on using the changeset viewer.