"Age" (Interpreter Type)
Age expressed in natural language.
Details
- "Age" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "Age" requires connectivity to the Wolfram Cloud.
Allowed Forms
- All the natural-language numbers allowed by "SemanticNumber" are supported for the quantity magnitude.
- The unit can be expressed in natural language, or via abbreviations or symbols.
Restriction Specifications
-
Restricted["Age",{{choices1,…}}] one among choices Restricted["Age",unit] convert to unit Restricted["Age",unit,max] an age below Quantity[max,unit] Restricted["Age",unit,{min,max}] an age between Quantity[min,unit] and Quantity[max,unit] Restricted["Age",unit,{min,max,s}] an age between Quantity[min,unit] and Quantity[max,unit] with step s Restricted["Age",Automatic,Automatic,n] an age whose magnitude has n-digit precision - The bounds min and max and step s can also be expressed as quantities.
Examples
Basic Examples (3)
Interpreter["Age"]["53 yo"]Interpreter["Age"]["6 months 3 days"]Restrict and convert to a unit:
Interpreter[Restricted["Age", "Minutes"]]["3 years"]If no unit is provided in the input string, imply years:
Interpreter["Age"]["2"]See Also
Interpreter SemanticImport Restricted Failure Quantity
Interpreter Types: ComputedAge Quantity PhysicalQuantity StructuredQuantity ComputedQuantity
Related Guides
History
Introduced in 2015 (10.2)