Changeset 16786 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Oct 4, 2006, 2:08:43 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/DateMath.cpp
r16783 r16786 114 114 } 115 115 116 static inline doublemsToYear(double ms)117 { 118 double y = floor(ms /(msPerDay*365.2425)) + 1970;116 static inline int msToYear(double ms) 117 { 118 int y = static_cast<int>(floor(ms /(msPerDay*365.2425)) + 1970); 119 119 double t2 = msFrom1970ToYear(y); 120 120 … … 144 144 } 145 145 146 static inline doubledayInYear(double ms, int year)147 { 148 return msToDays(ms) - daysFrom1970ToYear(year);146 static inline int dayInYear(double ms, int year) 147 { 148 return static_cast<int>(msToDays(ms) - daysFrom1970ToYear(year)); 149 149 } 150 150 … … 278 278 static int dateToDayInYear(int year, int month, int day) 279 279 { 280 year += floor(month / 12);281 282 month = fmod(month, 12.0);280 year += static_cast<int>(floor(month / 12)); 281 282 month = static_cast<int>(fmod(month, 12.0)); 283 283 if (month < 0) 284 284 month += 12;
Note:
See TracChangeset
for help on using the changeset viewer.