"StructuredDate" (Interpreter Type)
Date in a standard format.
Details
- "StructuredDate" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "StructuredDate" does not require connectivity to the Wolfram Cloud.
Allowed Forms
- A full date expressed in one of the following formats:
-
2010/11/25 year/month/day 1989-march-1 year/month name/day 1789 14 july year/day/month name - All the separators that DateList accepts are allowed.
Restriction Specifications
-
Restricted["StructuredDate",{{choices1,…}}] one among choices Restricted["StructuredDate",max] a date before max Restricted["StructuredDate",{min,max}] a date between min and max Restricted["StructuredDate",{min,max,unit}] a date between min and max, with resolution unit
Interpretation
- "StructuredDate" yields a DateObject.
Examples
Basic Examples (5)
Interpreter["StructuredDate"]["2010/11/25"]Interpreter["StructuredDate"]["1999/09/09"]Restrict the value to be within a given range:
Interpreter[Restricted["StructuredDate", {DateObject[{2010, 11, 12}], DateObject[{2010, 11, 12}] + Quantity[1, "Week"]}]]["2010/11/15"]Interpreter["StructuredDate"]["2015 apr 11"]Interpreter["StructuredDate"]["1945-04-25"]Interpreter["StructuredDate", DateFormat -> {"Day", "/", "Month", ",", "Year"}]["2/12, 2015"]Specify multiple accepted formats in a list:
Interpreter["StructuredDate", DateFormat -> {{"Month", "/", "Day", ",", "Year"}, {"Day", "/", "Month", "/", "Year"}}]["2/12, 2015"]No semantic interpretation of the year is allowed; "10" is interpreted as "10 AD", not "2010":
Interpreter["StructuredDate"]["10/11/12"]Dates that involve a time are not accepted:
Interpreter["StructuredDate"]["1999/09/09 09:09"]Related Guides
History
Introduced in 2014 (10.0)