"ComputedDateTime" (Interpreter Type)
Date with time derived by computation.
Details
- "ComputedDateTime" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "ComputedDateTime" requires connectivity to the Wolfram Cloud.
Allowed Forms
- Any natural-language date with time specification supported by "DateTime", or a computation yielding one.
Restriction Specifications
-
Restricted["ComputedDateTime",{{choices1,…}}] one among choices Restricted["ComputedDateTime",max] a date with time before max Restricted["ComputedDateTime",{min,max}] a date with time between min and max Restricted["ComputedDateTime",{min,max,unit}] a date with time between min and max, with resolution unit
Interpretation
- "ComputedDateTime" yields a DateObject with a TimeObject as its second argument.
Examples
Basic Examples (3)
Interpreter["ComputedDateTime"]["sunrise tomorrow"]Interpreter["ComputedDateTime"]["today @1pm"]Interpret dates with time derived by computation:
Interpreter["ComputedDateTime"]["2010-12-31 13:30 GMT to EST"]Interpreter["ComputedDateTime"]["now + 3 years"]Restrict the value to be within a given range:
Interpreter[Restricted["ComputedDateTime", {Now, Now + Quantity[2, "Hours"]}]]["now + runtime of Avatar"]Interpreter[Restricted["ComputedDateTime", {-Infinity, Now, "Hour"}]]["21:15 January 4th, 1990"]Pure dates or pure times are not accepted:
Interpreter["ComputedDateTime"]["today"]Interpreter["ComputedDateTime"]["10:30 CST"]Related Guides
History
Introduced in 2014 (10.0)