Numlex Documentation
Syntax Reference

Dates

The strict date grammar: months, relative days, durations, calendar semantics, output rules and errors.

Main branch reference after R89 · released versions may differ docs/SYNTAX_REFERENCE.md @ 1ebc752

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

#AbbreviationsFull name
1janjanuary
2febfebruary
3marmarch
4aprapril
5maymay
6junjune
7juljuly
8augaugust
9sep, septseptember
10octoctober
11novnovember
12decdecember

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 Calendarnot 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 30 is 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
  • 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.

Found an issue in these docs? Report it on GitHub .