Ignore:
Timestamp:
Jul 24, 2012, 12:25:30 PM (13 years ago)
Author:
Patrick Gansterer
Message:

Store the full year in GregorianDateTime
https://bugs.webkit.org/show_bug.cgi?id=92067

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Use the full year instead of the offset from year 1900
for the year member variable of GregorianDateTime.

  • runtime/DateConstructor.cpp:

(JSC::constructDate):
(JSC::dateUTC):

  • runtime/DateConversion.cpp:

(JSC::formatDate):
(JSC::formatDateUTCVariant):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncSetYear):

  • runtime/JSDateMath.cpp:

(JSC::gregorianDateTimeToMS):
(JSC::msToGregorianDateTime):

Source/WebCore:

Use the full year instead of the offset from year 1900
for the year member variable of GregorianDateTime.

  • bridge/qt/qt_runtime.cpp:

(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):

  • bridge/qt/qt_runtime_qt4.cpp:

(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):

Source/WTF:

Use the full year instead of the offset from year 1900
for the year member variable of GregorianDateTime.

  • wtf/GregorianDateTime.h:

(WTF::GregorianDateTime::operator tm):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/DateConversion.cpp

    r123425 r123505  
    6060    snprintf(buffer, DateConversionBufferSize, "%s %s %02d %04d",
    6161        weekdayName[(t.weekDay() + 6) % 7],
    62         monthName[t.month()], t.monthDay(), t.year() + 1900);
     62        monthName[t.month()], t.monthDay(), t.year());
    6363}
    6464
     
    6767    snprintf(buffer, DateConversionBufferSize, "%s, %02d %s %04d",
    6868        weekdayName[(t.weekDay() + 6) % 7],
    69         t.monthDay(), monthName[t.month()], t.year() + 1900);
     69        t.monthDay(), monthName[t.month()], t.year());
    7070}
    7171
Note: See TracChangeset for help on using the changeset viewer.