Page Under Construction
Date Phrases and Set Operations
Date phrases let you combine date expressions, including multiple calendar schemes, using set and other operators. This allows you to express unions, intersections, exclusions and differences between periods expressed in differing calendar schemes all in a single phrase. The phrase is then converted to an ordered list that can be displayed or further manipulated.
A Date Phrase is made up of one or more Date Expressions combined using operators. The supported operators are:
- Range - operator
..- specifies an inclusive range of dates between two date expressions. - Complement (
NOT) - operator!- specifies the inverse of a date expression. - Union (
OR) - operator|- combines two date expressions to include all dates from both expressions. - Intersection (
AND) - operator&&- combines two date expressions to include only dates that are present in both expressions. - Difference (
XOR) operator^^- includes dates that are present in either of the two expressions but not in both. - Exclusion (
AND NOT) - operator\\- removes dates from the first expression that are present in the second expression. - Parentheses
( ... )are supported for grouping and controlling precedence. - All values between operators must be well-formed dates or shortcut ranges in valid hics syntax (see earlier sections).
- Other arithmetic operators may appear in future releases.
Notes
Scheme and Format Qualification
A date phrase will have a default scheme and format unless otherwise specified.
To use non-default schemes in a phrase, prefix the entry with scheme[:format]#, for example:
| Example Script |
|---|
| @phrase.g:dmy("2025 | j:dmy# 2025") |
Combines the Gregorian year 2025 and Julian year 2025.