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


Ignore:
Timestamp:
Jun 29, 2008, 12:53:42 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-29 Sam Weinig <[email protected]>

Rubber-stamped by Oliver Hunt.

Splits DateConstructor and DatePrototype out of date_object.h/cpp
Moves shared Date code into DateMath.

  • DerivedSources.make:
  • GNUmakefile.am:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • kjs/AllInOneFile.cpp:
  • kjs/DateConstructor.cpp: Copied from kjs/date_object.cpp.
  • kjs/DateConstructor.h: Copied from kjs/date_object.h.
  • kjs/DateMath.cpp: (KJS::ymdhmsToSeconds): (KJS::): (KJS::skipSpacesAndComments): (KJS::findMonth): (KJS::parseDate): (KJS::timeClip): (KJS::formatDate): (KJS::formatDateUTCVariant): (KJS::formatTime):
  • kjs/DateMath.h: (KJS::gmtoffset):
  • kjs/DatePrototype.cpp: Copied from kjs/date_object.cpp.
  • kjs/DatePrototype.h: Copied from kjs/date_object.h.
  • kjs/JSGlobalObject.cpp:
  • kjs/JSObject.cpp:
  • kjs/date_object.cpp:
  • kjs/date_object.h:
  • kjs/internal.cpp:
File:
1 edited

Legend:

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

    r33930 r34872  
    4848namespace KJS {
    4949
     50class UString;
    5051struct GregorianDateTime;
    5152
     
    5859double getCurrentUTCTimeWithMicroseconds();
    5960void getLocalTime(const time_t*, tm*);
     61
     62// Not really math related, but this is currently the only shared place to put these. 
     63double parseDate(const UString&);
     64double timeClip(double);
     65UString formatDate(const GregorianDateTime&);
     66UString formatDateUTCVariant(const GregorianDateTime&);
     67UString formatTime(const GregorianDateTime&, bool inputIsUTC);
    6068
    6169
     
    174182};
    175183
    176 }   //namespace KJS
     184static inline int gmtoffset(const GregorianDateTime& t)
     185{
     186    return t.utcOffset;
     187}
     188
     189} // namespace KJS
    177190
    178191#endif // DateMath_h
Note: See TracChangeset for help on using the changeset viewer.