| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 + TO_INTEGER(ms); | 287 + TO_INTEGER(ms); |
| 288 } | 288 } |
| 289 | 289 |
| 290 | 290 |
| 291 // ECMA 262 - 15.9.1.12 | 291 // ECMA 262 - 15.9.1.12 |
| 292 function TimeInYear(year) { | 292 function TimeInYear(year) { |
| 293 return DaysInYear(year) * msPerDay; | 293 return DaysInYear(year) * msPerDay; |
| 294 } | 294 } |
| 295 | 295 |
| 296 | 296 |
| 297 var ymd_from_time_cache = [$NaN, $NaN, $NaN]; | 297 var ymd_from_time_cache = [1970, 0, 1]; |
| 298 var ymd_from_time_cached_time = $NaN; | 298 var ymd_from_time_cached_time = 0; |
| 299 | 299 |
| 300 function YearFromTime(t) { | 300 function YearFromTime(t) { |
| 301 if (t !== ymd_from_time_cached_time) { | 301 if (t !== ymd_from_time_cached_time) { |
| 302 if (!$isFinite(t)) { | 302 if (!$isFinite(t)) { |
| 303 return $NaN; | 303 return $NaN; |
| 304 } | 304 } |
| 305 | 305 |
| 306 %DateYMDFromTime(t, ymd_from_time_cache); | 306 %DateYMDFromTime(t, ymd_from_time_cache); |
| 307 ymd_from_time_cached_time = t | 307 ymd_from_time_cached_time = t |
| 308 } | 308 } |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 "toGMTString", DateToGMTString, | 1106 "toGMTString", DateToGMTString, |
| 1107 "toUTCString", DateToUTCString, | 1107 "toUTCString", DateToUTCString, |
| 1108 "getYear", DateGetYear, | 1108 "getYear", DateGetYear, |
| 1109 "setYear", DateSetYear, | 1109 "setYear", DateSetYear, |
| 1110 "toISOString", DateToISOString, | 1110 "toISOString", DateToISOString, |
| 1111 "toJSON", DateToJSON | 1111 "toJSON", DateToJSON |
| 1112 )); | 1112 )); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 SetUpDate(); | 1115 SetUpDate(); |
| OLD | NEW |