Reviewed by GGaren
authorkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 18:36:29 +0000 (18:36 +0000)
committerkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 18:36:29 +0000 (18:36 +0000)
commite016c395b0b252af988c96c0fd4c097caafad1bf
treea78425cec4e965997f9bd625a8943dd1904b4de5
parent55cb50685d4b4a446626ef60c67e139e6d6e92c3
    Reviewed by GGaren

        - This is a big makeover for our Date implemenetation.  This solves many platform specific issues, specifically dates before 1970, and simplifies some ugly code.  The purpose of this was to get us to pass many of the JavaScriptCore tests on windows.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/DateMath.cpp: Added.
        (KJS::):
        (KJS::daysInYear):
        (KJS::daysFrom1970ToYear):
        (KJS::msFrom1970ToYear):
        (KJS::msToDays):
        (KJS::msToYear):
        (KJS::isLeapYear):
        (KJS::isInLeapYear):
        (KJS::dayInYear):
        (KJS::msToMilliseconds):
        (KJS::msToWeekDay):
        (KJS::msToSeconds):
        (KJS::msToMinutes):
        (KJS::msToHours):
        (KJS::msToMonth):
        (KJS::msToDayInMonth):
        (KJS::monthToDayInYear):
        (KJS::timeToMseconds):
        (KJS::dateToDayInYear):
        (KJS::equivalentYearForDST):
        (KJS::getUTCOffset):
        (KJS::getDSTOffsetSimple):
        (KJS::getDSTOffset):
        (KJS::localTimeToUTC):
        (KJS::UTCToLocalTime):
        (KJS::dateToMseconds):
        (KJS::msToTM):
        (KJS::isDST):
        * kjs/DateMath.h: Added.
        (KJS::):
        * kjs/date_object.cpp:
        (KJS::gmtoffset):
        (KJS::formatTime):
        (KJS::DateInstance::getTime):
        (KJS::DateInstance::getUTCTime):
        (KJS::DateProtoFunc::callAsFunction):
        (KJS::DateObjectImp::construct):
        (KJS::DateObjectFuncImp::callAsFunction):
        (KJS::parseDate):
        * kjs/testkjs.cpp:
        * os-win32/stdint.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/DateMath.cpp [new file with mode: 0644]
JavaScriptCore/kjs/DateMath.h [new file with mode: 0644]
JavaScriptCore/kjs/date_object.cpp
JavaScriptCore/kjs/testkjs.cpp
JavaScriptCore/os-win32/stdint.h