Skip to content

ADR 0021 exceptions and table years release

Karthik P edited this page Nov 21, 2026 · 5 revisions

ADR-0021: exceptions, history, transitions and table years ship in 0.2

exceptions (overrides, history, transitions) and table years are designed but not implemented in 0.1.0; they are rejected with UNSUPPORTED_FEATURE and planned for 0.2.

Last reviewed: 21 Nov 2026

Status

Accepted on 31 Oct 2026 under the maintainer's delegation; may be revisited. The research proposal left this open ("Whether history, transitions and table years ship in v0.1 or v0.2"), and the maintainer asked for the roadmap and 0.1.0 to be decided and built without them. Applied in 0.1.0 as rejection; the features themselves are planned for 0.2.

Amended by ADR-0031 (Accepted, 15 Nov 2026): only exceptions.history with transition periods is planned for 0.2. exceptions.overrides, table years, year_number: "table", anchored, stub, special periods, extra_week.standalone and by_year, first_full, eras and RULE_CONFLICT move to 0.3. The decision below, to reserve and reject these parts in 0.1.0, is unchanged; where it says 0.2, read the release on the Roadmap.

Amended by ADRs 0035, 0036 and 0038 (Accepted, 21 Nov 2026): extra_week.standalone and by_year (ADR-0035), first_full (ADR-0036) and exceptions.overrides (ADR-0038) stay reserved and are not scheduled.

Amended by ADR-0032 (Accepted, 15 Nov 2026): the format has no exceptions.transitions list. A transition is nested in the history entry it leads into, and exceptions.transitions is UNKNOWN_FIELD from 0.2.

Context

The proposal's format has a table year type (explicit year starts, for Nepal, Iran, published leap-week schedules and ERP imports) and an exceptions block (overrides, history keyed by effective date, and transitions for short or long years such as India's 15-month years). The proposal says these "make the library trustworthy for enterprises but double the validation surface". Its risk table also says to add table, anchored and transitions to the format "before v0.1", so that the format does not need a breaking change later.

Two questions sat inside these features: whether table years accept period boundaries (ADR-0022) and how stub works (ADR-0024). Both were decided on 1 Nov 2026. The Nepal example in the proposal is illustrative: its dates are marked to be filled from an official converter.

Decision drivers

  • Ship a correct 0.1.0 without doubling the validation surface.
  • Never misread a definition that uses an unimplemented feature.
  • Keep the format stable, so adding these features later is not a breaking change.

Considered options

Option 1: Ship them in 0.1.0

Pros:

  • Enterprise and government calendars work from the first release.

Cons:

  • Doubles validation work (EXCEPTIONS_OVERLAP, TABLE_NOT_INCREASING, RULE_CONFLICT) before any of it is tested.
  • Two of the designs depend on ADRs 0022 and 0024, decided on 1 Nov 2026.

Option 2: Reserve the fields in the 0.1.0 format and reject them; implement in 0.2 (chosen)

Pros:

  • 0.1.0 covers fixed-date and week-based years well, and a definition using a reserved field fails loudly instead of being misread.
  • The field names are already reserved, so 0.2 adds behaviour without changing what existing definitions mean.

Cons:

  • Users with transition years, table years or changed year ends cannot use 0.1.0.

Option 3: Leave them out of the format entirely until designed

Pros:

  • Smallest 0.1.0 spec.

Cons:

  • A 0.1.0 definition containing them would be rejected as UNKNOWN_FIELD, which hides that they are planned.

Decision

Option 2. spec/definition-v1.md lists the reserved parts, each rejected with UNSUPPORTED_FEATURE and a hint naming the planned release: year.type: "table", subdivision.type: "anchored", subdivision.stub, subdivision.special_periods, extra_week.standalone and by_year, week.numbering: "first_full", year_number: "table", eras, and exceptions. All are planned for 0.2 on the Roadmap.

Contradictions

  • D12 (resolved for 0.1.0). The proposal's risk table says to add table, anchored and transitions to the format before v0.1, while v0.1 is described as calendar-month and week-based years, so it was unclear whether anchored and special_periods are implemented in v0.1. Decision: they are reserved in the 0.1.0 format and rejected, which satisfies "in the format" without implementing them.
  • D2 (resolved by ADR-0022). The Nepal example uses year_number: "table" and boundaries[].number, but the proposal's block table lists neither (year_number is start, end or majority, and boundaries is a list of dates). year_number: "table" is reserved and rejected in 0.1.0; ADR-0022 makes boundaries a list of dates and drops year_number: "table".
  • D11 (open). RULE_CONFLICT, planned for 0.2, will be tested with the Care.com rules. The divergent years depend on reading "closest and prior to December 31" as "on or before"; read strictly, 2022 also diverges, and the documents' list holds only for a 2019 to 2028 window (checks C16 and C17 in research/verification/). Care.com itself moved to a calendar year during fiscal 2019, so the vector tests the two rules as written, not Care.com's current calendar (Evidence).

Consequences

Good:

  • 0.1.0 never silently misreads a definition written for a later release.
  • The validation for these features can be built and tested on its own in 0.2.

Bad:

  • Calendars that need these features (Nepal, Iran, SAP special periods, India's transition years, the broadcast calendar's anchored periods) cannot be expressed in 0.1.0.
  • The format may still need changes in 0.2 if ADR-0022 or ADR-0024 settle on shapes that differ from the reserved names.

Links

Clone this wiki locally