Changeset 46992 in webkit for trunk/JavaScriptCore/runtime/DateConstructor.cpp
- Timestamp:
- Aug 10, 2009, 11:30:24 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/DateConstructor.cpp
r44866 r46992 37 37 38 38 #if PLATFORM(WINCE) && !PLATFORM(QT) 39 extern "C" time_t time(time_t* timer); // provided by libce39 extern "C" time_t time(time_t* timer); // Provided by libce. 40 40 #endif 41 41 … … 51 51 52 52 namespace JSC { 53 54 // TODO: MakeTime (15.9.11.1) etc. ?55 53 56 54 ASSERT_CLASS_FITS_IN_CELL(DateConstructor); … … 101 99 value = NaN; 102 100 else { 103 GregorianDateTime t;104 int year = args.at(0).toInt32(exec);105 t.year = (year >= 0 && year <= 99) ? year : year - 1900;106 t.month = args.at(1).toInt32(exec);107 t.monthDay = (numArgs >= 3) ? args.at(2).toInt32(exec) : 1;108 t.hour = args.at(3).toInt32(exec);109 t.minute = args.at(4).toInt32(exec);110 t.second = args.at(5).toInt32(exec);111 t.isDST = -1;112 double ms = (numArgs >= 7) ? args.at(6).toNumber(exec) : 0;113 value = gregorianDateTimeToMS(t, ms, false);101 GregorianDateTime t; 102 int year = args.at(0).toInt32(exec); 103 t.year = (year >= 0 && year <= 99) ? year : year - 1900; 104 t.month = args.at(1).toInt32(exec); 105 t.monthDay = (numArgs >= 3) ? args.at(2).toInt32(exec) : 1; 106 t.hour = args.at(3).toInt32(exec); 107 t.minute = args.at(4).toInt32(exec); 108 t.second = args.at(5).toInt32(exec); 109 t.isDST = -1; 110 double ms = (numArgs >= 7) ? args.at(6).toNumber(exec) : 0; 111 value = gregorianDateTimeToMS(t, ms, false); 114 112 } 115 113 }
Note:
See TracChangeset
for help on using the changeset viewer.