Skip to content

v2.0.0

Latest

Choose a tag to compare

@hf-kklein hf-kklein released this 09 Sep 09:55
· 1 commit to main since this release
f81e055

Breaking: input that previously returned a value now throws. Signatures are unchanged, so no compile error warns you.

  • getEdifactFormatVersion(new Date("nonsense")) returned FV2704 — the newest format version — because an Invalid Date's time is NaN and every comparison against it is false. It now throws. Any UI building a Date from free text needs a try/catch.
  • getEdifactFormatVersionLabel returned undefined for anything outside the enum, and a native function for inherited keys like "toString". It now throws. A caller using getEdifactFormatVersionLabel(fv) ?? "unbekannt" goes from rendering a fallback to throwing.
  • A CalendarDate that 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