Index: src/macros.py |
=================================================================== |
--- src/macros.py (revision 6041) |
+++ src/macros.py (working copy) |
@@ -140,15 +140,14 @@ |
# Limit according to ECMA 262 15.9.1.1 |
const MAX_TIME_MS = 8640000000000000; |
+# Limit which is MAX_TIME_MS + msPerMonth. |
+const MAX_TIME_BEFORE_UTC = 8640002592000000; |
# Gets the value of a Date object. If arg is not a Date object |
# a type error is thrown. |
macro DATE_VALUE(arg) = (%_ClassOf(arg) === 'Date' ? %_ValueOf(arg) : ThrowDateTypeError()); |
macro DAY(time) = ($floor(time / 86400000)); |
-macro MONTH_FROM_TIME(time) = (MonthFromTime(time)); |
-macro DATE_FROM_TIME(time) = (DateFromTime(time)); |
-macro NAN_OR_DATE_FROM_TIME(time) = (NUMBER_IS_NAN(time) ? time : DATE_FROM_TIME(time)); |
-macro YEAR_FROM_TIME(time) = (YearFromTime(time)); |
+macro NAN_OR_DATE_FROM_TIME(time) = (NUMBER_IS_NAN(time) ? time : DateFromTime(time)); |
macro HOUR_FROM_TIME(time) = (Modulo($floor(time / 3600000), 24)); |
macro MIN_FROM_TIME(time) = (Modulo($floor(time / 60000), 60)); |
macro NAN_OR_MIN_FROM_TIME(time) = (NUMBER_IS_NAN(time) ? time : MIN_FROM_TIME(time)); |