Skip to content
  • kmccullo's avatar
    JavaScriptCore: · 014b4536
    kmccullo authored
            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:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    014b4536