Index: src/macros.py |
=================================================================== |
--- src/macros.py (revision 4103) |
+++ src/macros.py (working copy) |
@@ -136,9 +136,9 @@ |
# 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) = (FromJulianDay(($floor(time / 86400000)) + 2440588).month); |
-macro DATE_FROM_TIME(time) = (FromJulianDay(($floor(time / 86400000)) + 2440588).date); |
-macro YEAR_FROM_TIME(time) = (FromJulianDay(($floor(time / 86400000)) + 2440588).year); |
+macro MONTH_FROM_TIME(time) = (MonthFromTime(time)); |
+macro DATE_FROM_TIME(time) = (DateFromTime(time)); |
+macro YEAR_FROM_TIME(time) = (YearFromTime(time)); |
macro HOUR_FROM_TIME(time) = (Modulo($floor(time / 3600000), 24)); |
macro MIN_FROM_TIME(time) = (Modulo($floor(time / 60000), 60)); |
macro SEC_FROM_TIME(time) = (Modulo($floor(time / 1000), 60)); |