Index: src/macros.py |
diff --git a/src/macros.py b/src/macros.py |
index 8e9c62dbe580132856943703d802b0a4c992709d..dcc414b178a4a4ac232211476e4d1994ed4a2c46 100644 |
--- a/src/macros.py |
+++ b/src/macros.py |
@@ -164,7 +164,8 @@ 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 DATE_VALUE(arg) = (%_ClassOf(arg) === 'Date' ? %_DateField(arg, -1) : ThrowDateTypeError()); |
+macro SET_DATE_VALUE(arg, value) = (%_SetDateField(arg, -1, value)); |
macro DAY(time) = ($floor(time / 86400000)); |
macro NAN_OR_DATE_FROM_TIME(time) = (NUMBER_IS_NAN(time) ? time : DateFromTime(time)); |
macro HOUR_FROM_TIME(time) = (Modulo($floor(time / 3600000), 24)); |