edtf-normalize
Deterministic prose-date → EDTF normalizer: "1980s" → 198X,
"circa 1920" → 1920~, "около 1920 г." → 1920~ — instant, offline,
the same answer on every keystroke. no_std + alloc, no third-party dependencies (only edtf-core).
Built for the human input boundary: values are constructed through
edtf-core's model and rendered by its canonical Display,
then re-parsed, so every output is valid, canonical EDTF by construction.
The return type is honest — Normalized { edtf, value, notes },
Ambiguous { interpretations }, or NoMatch — never a silent guess:
use ;
let Normalized = normalize else ;
assert_eq!;
// "12/04/1985" is DD/MM or MM/DD — the form gets both readings, not a guess.
assert!;
// Freeform prose is the caller's problem, by design.
assert!;
Pattern tables are per-language (English and Russian today); adding a locale
means adding one table struct, not touching the grammar. Every judgement call
— century arithmetic, BC year-zero handling, season codes, ambiguity policy —
is a numbered N-decision in
docs/normalize-notes.md,
cited from the Note values attached to every result. Disagree with one?
File an issue against the N-number.
Exposed to JavaScript through edtf-wasm's normalize().