Dates & times
The complete temporal reference: dates, duration arithmetic, clocks, timezones, timestamps/ISO, Timespan, video timecode, work calendars and special dates.
Numlex treats dates and times as first-class quantities with strict, bounded
grammar. A line either matches a date or time pattern exactly or stays ordinary
prose — May 5 + 3 weeks works, May 5 + 43 is an error, and a lone month word is not
a date. Calendar arithmetic is component-based on the local Gregorian calendar,
so daylight-saving transitions cannot shift a day.
This page is the complete temporal reference: calendar dates, duration
arithmetic, clocks and laptime, timezones, timestamps and ISO 8601, the
Timespan notation, video timecode and frames, work calendars, special dates,
their Settings dependencies, and the strict error rules.
Calendar dates
<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 − (ASCII -
works too). Months, abbreviated and full:
| # | 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 |
today, tomorrow and yesterday resolve against the captured local date and
combine with durations. Compound periods apply calendar component by component:
March 12 + 3 weeks 2 days → Apr 4, May 10 - 1 week 3 days. Each component
is capped at 1,000,000.
The result shows its year when the input specified a year or when the result falls outside the input year. The anchor is local noon, so DST changes never move the day.
today → today (per the local calendar)
tomorrow + 1 month
yesterday - 2 weeks
May 5 → May 5 (current year)
May 5, 2026 + 30 days → Jun 4, 2026
5 May 2026
dec 31
Errors in the date syntax:
- Periods over 1,000,000 are a hidden error.
Feb 30is date-shaped but invalid — a hidden error.May 5 + 43(a number with no duration word) is an error, never reduced to plain arithmetic.May 5 + 43 days extra— a tail after a valid date — is an error.- A lone month word (
may) is not a date; it stays prose.
Duration arithmetic
Several fixed time units in a row read as one duration:
1 h 45 min,1 hour 45 minutes,2 hr 5 mins,1 day 2 hours 30 min,1 min 250 ms,1 week 2 days.- Glued safe forms:
1h45min,45min,30sec,500ms,2hr,2wks,1day2hours30min. Glued aliases come from a whitelist only (ms s sec secs second(s) min mins minute(s) h hr hrs hour(s) day(s) week(s) wk wks); a lone gluedmis never minutes (5m= 5,000,000,5 m= metres) and a lone gluedsis not accepted. - Compound durations use the fixed units from
msthroughweek. Average calendar units (mo,yr,quarter (time)) and unrelated units do not compose implicitly:1 m 20 cmis an error, and1 mo 2 daysdoes not compose.
Components may appear in any order and may repeat; values add. The group is bound into one primary operand before multiplication or division:
1 h 30 min / 3 → 30 min (not 1 h 10 min)
(1 h 20 min) × 2 → 2 h 40 min
3 × (1 h 15 min) → 3 h 45 min
1 h 45 min + 30 min → 2 h 15 min
2 hr 10 min - 45 min → 1 h 25 min
1 day 2 h + 90 min → 1 day 3 h 30 min
1 week 2 days - 1 day → 1 week 1 day
2 min 30 sec × 3 → 7 min 30 s
1 min 250 ms + 750 ms → 1 min 1 s
1.5 h + 30 min → 2 h
A duration stays a real typed quantity (dimension T¹, a real time unit, its
value on that unit’s scale) — not a string and not dimensionless seconds.
Parentheses, unary minus, variables and constants holding time all work
(focus time = 1 h 30 min, then focus time + 15 min = 1 h 45 min), and
durations are tokenizable like other quantities.
Output uses a natural breakdown (weeks, days, hours, minutes,
seconds; milliseconds for a sub-second remainder), drops zero components,
normalizes carries and prints one sign: 2 h 15 min, 1 day 3 h 30 min,
7 min 30 s, -30 min, 500 ms. An explicit conversion resets the natural
form to a single-unit result: 1 h 30 min to min = 90 min,
1 h 30 min in hours = 1.5 h, 1 h 30 min as seconds = 5400 s.
Speeds and derived units never turn into durations (90 km / 3 h =
30 km/h), and date syntax keeps priority (May 5 + 2 days is a date).
Durations have no per-answer notation or rounding controls.
Clocks and laptime
Clock syntax is checked before mixed units and dates:
3:30pm + 2 hours 15 minutes → 5:45 pm
3:30pm - 2 hours 15 minutes → 1:15 pm
11:30pm + 45 min → Tomorrow 12:15 am
now + 3 hours 25 minutes → local wall time + 3 h 25 min
01:02:03 + 01:09:54 → 02:11:57 (elapsed time / laptime)
00:00:01.5 + 00:00:01 → 00:00:02.50
7:30am to 8:45pm → 13 h 15 min (interval forward)
4pm to 3am → 11 h
3:30pm as laptime → 15:30:00
Accepted forms are h:mm, h:mm:ss, h am/pm and 4pm; AM/PM is
case-insensitive and may be glued or spaced. Minutes and seconds are 0…59, the
12-hour clock is 1…12 and the 24-hour clock is 0…23 (25:00 is a strict
error). Addition and subtraction work on wall components, so a DST change
never shifts the requested minutes, and a day rollover prints
Yesterday/Today/Tomorrow. clock + clock (3:30pm + 3:30pm) is a strict error;
a bare h:mm:ss without AM/PM stays elapsed time rather than a time of day.
Display follows the region: 12-hour for legacy/North America, 24-hour for
Europe, the locale’s hour cycle for System. Clock rows are excluded from the
Total, have no notation or rounding (Copy/Delete only) and cannot become
numeric tokens.
Timezones
time in Paris → current time in the zone
Tokyo time → same, "<place> time" form
date in Vancouver → date in the zone
6pm Sydney in Chicago → 3:00 am
2am PST to GMT → 10:00 am
3pm GMT+8 to Paris → 9:00 am
7:30am LAX to Japan → 11:30 pm
time difference between Chicago and Paris → 7 h
difference between PDT & AEST → 17 h
A source resolves through the full offline catalog: IANA identifiers and
aliases, cities (with the City, CC qualifier), country names, country codes,
IATA/ICAO codes, fixed abbreviations (EST/EDT/CST/CDT/MST/MDT/PST/PDT/AKST/
AKDT/HST, AEST/AEDT/ACST/ACDT/AWST/NZST/NZDT/BST/CET/CEST/EET/EEST/MSK/JST/KST/
HKT/SGT) and GMT/UTC/GMT±H[:MM]. The source wall time is anchored to the
captured date in its zone, converted to one absolute instant and displayed
in the target zone, so A → B → A preserves the instant; real DST transitions
are honored and a nonexistent source time is a strict error. An unknown place
on a timezone line is a strict error. A bare 6pm, dates and geo lines are
handled by their own rules. Custom aliases (Settings → Dates & Times) override only
recognized names/IANA identifiers and live in the app — never in .nlx.
Offline timezone catalog
The app ships a timezone catalog (about 1 MB): IANA identifiers and aliases, cities with a population of at least 100,000, country → capital zone, and IATA/ICAO → zone. The data is built from public sources (IANA tzdata, GeoNames, airportsdata) and used entirely offline; no network access is required.
Timestamps and ISO 8601
Timestamp syntax is checked before unit conversions and the ordinary date fallback:
current timestamp → 1,554,112,800 (number from captured now)
April 1, 2019 3:30pm as iso8601 → 2019-04-01T15:30:00+02:00
2019-04-01T15:30:00 to date → Apr 1, 2019 3:30:00 pm
April 1, 2019 to timestamp → 1,554,112,800
1559740303.48 to date → Jun 5, 2019 3:11:43 pm
1733823083000 to date → Dec 10, 2024 10:31:23 am
Seconds are Unix time from 1970-01-01T00:00:00Z; finite fractional values are
allowed. Values of 1e12 or more are treated as milliseconds
(1733823083000 to date). A date without a time bound to to timestamp anchors to local noon
(DST-safe). The ISO form accepts Z, ±HH:MM, optional seconds and fractional
parts; an explicit offset is kept as the presentation zone, otherwise your
local zone is used. ISO output is yyyy-MM-dd'T'HH:mm:ssXXX;
date-time output follows the regional 12/24-hour style in a fixed
English order (Apr 1, 2019 3:30 pm). Invalid, nonexistent (DST gap) and
overflowing values are strict errors. Date/ISO rows are excluded from the
inline and footer Totals and from the numeric Previous Answer chain; tokens on
them stay safely inactive.
Timespan
The Timespan notation is selected globally (Numbers → Default answer format)
or per answer (Number Format in the context menu) and applies only to
time-dimension quantities; any non-time number falls back to
Automatic. The explicit as timespan suffix works regardless of the setting:
5.5 minutes as timespan → 5 min 30 s
4.54 hours as timespan → 4 hours 32 minutes 24 seconds
72 days as timespan → 10 weeks 2 days
3 hours 5 minutes 10 seconds → 3 h 5 min 10 s
3h 5m 10s in seconds → 11,110 s
The breakdown uses average units (yr = 365.2425 d and
mo = 30.436875 d), then weeks, days, hours, minutes, seconds and ms; it
prints one decimal, drops zero components and carries rounding into the largest
component. Average yr/mo are linear factors only — calendar arithmetic
(+ 1 month) still uses Calendar components. Glued-unit grammar: inside an
already-proven duration chain 3h 5m 10s, m and s mean minutes and
seconds; standalone 5m (5,000,000), 5 m (metres) and 10s are unchanged.
in seconds/in minutes/… resets to a single standard presentation. The same
typed grammar serves ordinary lines, assignments and Answer Token expressions.
Video timecode and frames
Timecode syntax is checked before clocks and mixed units:
03:10:20:05 at 30 fps + 50 frames → 03:10:21:25
00:10:20:50 @ 60 fps + 10 minutes → 00:20:20:50
00:30:10:00 @ 24 fps in frames → 43,440 frames
43,440 frames @ 24 fps → 00:30:10:00
03:10:20:05 at 30 fps + 03:10:20:010 → 06:20:40:15
03:10:20:05 at 12 fps - 00:20:35:00 → 02:49:45:05
30 fps × 3 minutes → 5,400 frames
15.6k frames / 24 fps → 650 s
Frames are counted exactly (never through rounded seconds): fps is an integer
from 1 to 1000, and drop-frame syntax is not supported. Inside a timecode
expression fps means frames per second; outside it the previous speed alias
fps = ft/s is unchanged. FPS is required for every
operation; mismatched rates, a missing fps, out-of-range values, frame-count
overflow and broken codes are strict errors. The frame field normalizes carries and
prints at least two digits (the input :010 is accepted). Timecode and frame
rows are excluded from the Total, rounding and the numeric Previous Answer
chain; tokens on them are inactive.
Work calendars and holidays
A workday is Monday–Friday minus the public holidays of the selected region. Date ranges are start-exclusive/end-inclusive; a missing year uses the captured current year. An unsupported region or year is a strict error rather than a silent holiday skip.
workdays in 3 weeks → 15 workdays
10 March to 17 March in workdays → 5 workdays
workdays from April 12 to June 15 → 44 workdays
$500/workday × 4 weeks → $10,000.00
work hours in June → 6 day 16 h
work hours between March 12 and March 25 → 3 day
55h in work days → 6.875 workdays
December 24 + 2 workdays → Dec 29
Aliases: workday(s), work day(s), business day(s), weekday(s); the
weekday on <date> query and ordinary prose are not captured. Undated weeks
count five workdays per week. Work hours are typed durations; a money rate per
workday keeps its currency form; hours per workday comes from Settings (1…24).
Holidays come from the built-in offline catalog (25 countries,
2019–2035); no network is used, and a region or year outside the catalog is an
error.
Special dates
These special dates are built in:
Easter → Apr 20 (captured current year)
Easter 2027 → Mar 28, 2027
Christmas → Dec 25
days until Christmas → 344 days
days until Easter → 95 days
Easter 2027 + 2 days → Mar 30, 2027
Easter uses the Gregorian computus; the nearest occurrence for
days until takes this year’s date when it is still in the future, otherwise
next year’s. An unknown holiday name (days until Festivus) is a strict error,
and prose containing christmas/easter is not captured. Christmas is always
December 25.
Settings dependencies
Date and time results are computed from one captured now per sheet, the
local Gregorian calendar and zone, and the regional hour style (12/24):
legacy/North America is 12-hour, Western/Eastern Europe is 24-hour, and System
follows the locale’s hour cycle.
The persisted date/time settings are:
- Hours per workday (1…24, default 8), used by work-hours and workday conversions.
- Holiday region (
automaticby default); workdays skip that region’s public holidays and unsupported regions fail in dated workday queries. - Custom timezones, up to 100, each with a name and an IANA identifier.
These preferences are app-global, never enter a .nlx export and are never
saved into a sheet.
Totals, tokens and errors
- Clock, date, timestamp/ISO and timecode rows are excluded from the inline and footer Totals, have no notation or rounding, and do not join the numeric Previous Answer chain (tokens on them stay inactive).
- Durations are real typed quantities: they propagate through variables, constants and tokens, and behave like other quantities in expressions.
- Unknown places, unsupported workday regions/years, invalid or nonexistent dates, invalid clock values, missing fps and overflowing values are strict errors — never a guessed number.
Related
- Units & quantities — the unit catalog, derived units and speed aliases that share the same time-unit boundaries.
- Settings & appearance — the Dates & Times page in the app and the Numbers answer-format setting.
- Natural calculations — date and time examples in everyday sheets.