Breaking: input that previously returned a value now throws. Signatures are unchanged, so no compile error warns you.
getEdifactFormatVersion(new Date("nonsense"))returnedFV2704— the newest format version — because anInvalid Date's time isNaNand every comparison against it is false. It now throws. Any UI building aDatefrom free text needs atry/catch.getEdifactFormatVersionLabelreturnedundefinedfor anything outside the enum, and a native function for inherited keys like"toString". It now throws. A caller usinggetEdifactFormatVersionLabel(fv) ?? "unbekannt"goes from rendering a fallback to throwing.- A
CalendarDatethat is not a real date ({ month: 13 }, April 31st, February 29th in a non-leap year), whose components are not integers, or whose year lies outside 1–9999 now throws instead of being normalized into a neighbouring month.
See the README's new Validation section.
What's Changed
- Reject key dates that cannot denote a real instant by @hf-kklein in #15
Full Changelog: v0.1.0...v2.0.0