Index: src/macros.py |
=================================================================== |
--- src/macros.py (revision 2293) |
+++ src/macros.py (working copy) |
@@ -113,6 +113,10 @@ |
# REGEXP_NUMBER_OF_CAPTURES |
macro NUMBER_OF_CAPTURES(array) = ((array)[0]); |
+# 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) : ThrowTypeError()); |
+ |
# Last input and last subject are after the captures so we can omit them on |
# results returned from global searches. Beware - these evaluate their |
# arguments twice. |