"ComputedTime" (Interpreter Type)
A time specification derived by computation.
Details
- "ComputedTime" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "ComputedTime" requires connectivity to the Wolfram Cloud.
Allowed Forms
- Any natural-language time specification supported by "Time", or a computation yielding one.
Restriction Specifications
-
Restricted["ComputedTime",{{choices1,…}}] one among choices Restricted["ComputedTime",max] a time before max Restricted["ComputedTime",{min,max}] a time between min and max Restricted["ComputedTime",{min,max,unit}] a time between min and max, with resolution unit
Interpretation
- "ComputedTime" yields a TimeObject.
Examples
Basic Examples (3)
Interpret time specifications:
Interpreter["ComputedTime"]["10:30 GMT"]Interpreter["ComputedTime"]["3 o'clock"]Interpret time specifications derived by computation:
Interpreter["ComputedTime"]["2.5 hours before noon"]Interpreter["ComputedTime"]["10:15 - 360 seconds"]Restrict the time to be before noon:
Interpreter[Restricted["ComputedTime", TimeObject[{12, 0, 0.}]]]["10am + runtime of ET"]Restrict the value in a range and with a given resolution:
Interpreter[Restricted["ComputedTime", {TimeObject[{22, 0}], TimeObject[{23, 0}], "Minute"}]][{"22:00:23", "10 pm + 20 mins"}]Related Guides
History
Introduced in 2014 (10.0)