Ignore:
Timestamp:
Oct 4, 2006, 11:36:29 AM (19 years ago)
Author:
kmccullo
Message:

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

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r16621 r16780  
    261261                93F0B3AC09BB4DC00068FCE3 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F0B3AA09BB4DC00068FCE3 /* Parser.h */; };
    262262                BCF655590A2049710038A194 /* MathExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF6553B0A2048DE0038A194 /* MathExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
     263                D212022A0AD4310D00ED79B6 /* DateMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D21202280AD4310C00ED79B6 /* DateMath.cpp */; };
     264                D212022B0AD4310D00ED79B6 /* DateMath.h in Headers */ = {isa = PBXBuildFile; fileRef = D21202290AD4310C00ED79B6 /* DateMath.h */; };
    263265                E195679609E7CF1200B89D13 /* UnicodeIcu.h in Headers */ = {isa = PBXBuildFile; fileRef = E195678F09E7CF1200B89D13 /* UnicodeIcu.h */; };
    264266                E195679809E7CF1200B89D13 /* Unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = E195679409E7CF1200B89D13 /* Unicode.h */; };
     
    516518                93F1981A08245AAE001E9ABC /* keywords.table */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = keywords.table; sourceTree = "<group>"; tabWidth = 8; };
    517519                BCF6553B0A2048DE0038A194 /* MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MathExtras.h; sourceTree = "<group>"; };
     520                D21202280AD4310C00ED79B6 /* DateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateMath.cpp; sourceTree = "<group>"; };
     521                D21202290AD4310C00ED79B6 /* DateMath.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DateMath.h; sourceTree = "<group>"; };
    518522                E195678F09E7CF1200B89D13 /* UnicodeIcu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnicodeIcu.h; sourceTree = "<group>"; };
    519523                E195679409E7CF1200B89D13 /* Unicode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Unicode.h; sourceTree = "<group>"; };
     
    851855                                F692A8550255597D01FF60F7 /* date_object.cpp */,
    852856                                F692A8560255597D01FF60F7 /* date_object.h */,
     857                                D21202280AD4310C00ED79B6 /* DateMath.cpp */,
     858                                D21202290AD4310C00ED79B6 /* DateMath.h */,
    853859                                F692A8580255597D01FF60F7 /* debugger.cpp */,
    854860                                F692A8590255597D01FF60F7 /* debugger.h */,
     
    11231129                                65C7A1740A8EAACB00FA37EA /* JSWrapperObject.h in Headers */,
    11241130                                93B6A0DF0AA64DA40076DE27 /* GetPtr.h in Headers */,
     1131                                D212022B0AD4310D00ED79B6 /* DateMath.h in Headers */,
    11251132                        );
    11261133                        runOnlyForDeploymentPostprocessing = 0;
     
    12271234                        isa = PBXProject;
    12281235                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
    1229                         compatibilityVersion = "Xcode 2.4";
    12301236                        hasScannedForEncodings = 1;
    12311237                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
     
    12331239                        projectDirPath = "";
    12341240                        projectRoot = "";
    1235                         shouldCheckCompatibility = 1;
    12361241                        targets = (
    12371242                                932F5B3E0822A1C700736975 /* JavaScriptCore */,
     
    14121417                                65400C110A69BAF200509887 /* PropertyNameArray.cpp in Sources */,
    14131418                                65C7A1730A8EAACB00FA37EA /* JSWrapperObject.cpp in Sources */,
     1419                                D212022A0AD4310D00ED79B6 /* DateMath.cpp in Sources */,
    14141420                        );
    14151421                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.