Dates
The strict date grammar: months, relative days, durations, calendar semantics, output rules and errors.
Dates are a strict, bounded part of the language: May 5 + 3 weeks works,
May 5 + 43 is an error, and a lone month word is just prose. Arithmetic is
component-based on the local Gregorian calendar — not seconds-since-epoch — so
daylight-saving transitions cannot shift a day.
This page is the complete date grammar: the accepted month names and
abbreviations, today/tomorrow/yesterday, the duration words, the output
year rule, and every documented limit and error case.
Grammar
<date> [ <sign> <integer> <duration> ]
<date> := today | tomorrow | yesterday
| <month> <day>
| <month> <day>, <year>
| <day> <month> [<year>]
<duration> := day(s) | week(s) | month(s) | year(s)
All words are English and case-insensitive. The sign is + or − (the ASCII
- works too).
Months
| # | Abbreviations | Full name |
|---|---|---|
| 1 | jan | january |
| 2 | feb | february |
| 3 | mar | march |
| 4 | apr | april |
| 5 | may | may |
| 6 | jun | june |
| 7 | jul | july |
| 8 | aug | august |
| 9 | sep, sept | september |
| 10 | oct | october |
| 11 | nov | november |
| 12 | dec | december |
Relative dates
today, tomorrow and yesterday resolve against the local calendar. They
can be combined with a duration: tomorrow + 1 month,
yesterday - 2 weeks.
Durations
The accepted duration words are day, days, week, weeks, month,
months, year, years. Durations are component-based: one month from
January 31 is not “31 days later” — the calendar components are advanced, and
the local-noon anchor keeps the day stable across daylight-saving changes.
Calendar semantics
- Gregorian calendar.
- Component arithmetic on
Calendar— not 86400-second multipliers. - Anchored to local noon so that DST transitions never shift a day.
Output year
The result year is shown when the input specified a year, or when the result moves outside the input year.
Limits and errors
- Periods up to 1,000,000; anything larger is a hidden error.
Feb 30is date-shaped but not a valid date — a hidden error.May 5 + 43(a number without a duration word) is an error — never “reduced” to plain numbers.May 5 + 43 days extra— a tail after a valid date — is an error.- A lone month word without a day (
may) is not a date; it stays ordinary prose.
Examples
today → today (per the local calendar)
tomorrow + 1 month
yesterday - 2 weeks
May 5 → May 5 (current year)
May 5, 2026 + 30 days
5 May 2026
dec 31
Related
- Sheet language — how date-shaped lines claim their text strictly.
- Units & quantities — durations as catalog time units
(
1 day,2 weeks) when used in quantity expressions.