Releases: AndyFooBlah/nl2time
Release list
0.3.1 — benchmark-driven parser & engine fixes
Fixes found by agent-time-bench: inclusive 'between DATE and DATE' (#17), since/until/through/by open ranges (#18), cross-midnight ranges under day anchors (#19), 'earlier this week' (#20), ' before last' (#21), 'the weekend of ' (#22), 'first/second half of ' (#24). Zero conformance-baseline regressions; engine changes ported to Python at 100% parity. See CHANGELOG.md.
Python 0.1.1 — engine parity with JS 0.3.1
v0.3.0 — multilingual parsing
Six languages, corpus-first: English 84.3% (1,031 cases), Spanish 96.0% (579), French 89.9% (406), German 97.5% (157), Japanese 95.7% (393), Chinese 95.4% (175) on imported Recognizers-Text conformance corpora — 2,486/2,741 gradeable cases, all per-language CI regression baselines.
- Language registry dispatched by the context locale; unknown locales fall back to English
makeLatinRulesfactory (exported) for Latin-script languages: lexicon-parameterized grammar incl. ranges, durations, word-number dates, scoped weeks, end-of boundaries- CJK support: per-character tokenization, fullwidth normalization, kanji/hanzi numerals, era years (令和/民国…), bespoke ja/zh rule modules
- Corpus inversion tool (reverse cases derived from forward cases), domain packs (0.2.0) carried forward
- French corpus: 231 upstream ref-mismatch artifacts excluded at import, counted and documented
- Known engine gaps tracked: #14 (invalid-date completion), #15 (multilingual-surfaced gaps)
Note: describe() rendering remains English; localized rendering is the next milestone.
v0.1.2
Fixes #10: bare hours now bind to day-shifting period phrases — "10 last night" → 22:00 on the previous day (was silently dropping the hour and returning the night window, whose 21:00 start read as "9pm"). Covers last night / yesterday / tomorrow , with small-hours→am ("3 last night" = 3am) and the #9 noun-guard ("the count was 4 last night" keeps the range reading). +5 corpus cases; imported baseline unchanged (559/693).
Python 0.1.0 — engine at full parity (PyPI)
First Python release, on PyPI as nl2time: the language-neutral core — IR validation, TimeContext, and the deterministic resolver (every op incl. holidays, business-day spans, DST-correct arithmetic, ordered ambiguity candidates) — at 100% bit-exact parity with the JS reference across all 2,760 engine-parity fixtures, enforced in CI. Time model: whenever. Parsing/rendering remain JS-only for now; IR producers today are the JS parser, schema-constrained LLM output, or your own code. pip install nl2time
v0.1.0
First release: bidirectional natural language ⇄ date/time around a deterministic JSON IR.
- NL → time: English parser (dates, times, ranges, durations, holidays, weekends, business days) emitting
TimeExpr; deterministic resolution against aTimeContext(injectable now, IANA timezone, locale with CLDR week-start/date-order defaults, ambiguity policy knobs). Ambiguity returns ordered candidates, never guesses. - Time → NL:
describe()chooses framing (calendar/elapsed/absolute) and renders via Intl —2026-07-20T04:00Zfor a Pacific user on Jul 20 is "9pm last night". Round-trip invariant property-tested. - LLM adapter (
nl2time/llm): schema-constrained IR emission only — the model never computes dates. - Corpus (
nl2time/corpus+corpus/): bidirectional golden sets (100% passing) plus 693 cases imported from Microsoft Recognizers-Text (MIT), 80.7% passing as a CI-gated baseline.
Install: npm install nl2time — https://www.npmjs.com/package/nl2time