Skip to content

V2: Per-country year ranges#320

Merged
Nielsvanpach merged 1 commit intov2from
feature/per-country-year-ranges
Feb 25, 2026
Merged

V2: Per-country year ranges#320
Nielsvanpach merged 1 commit intov2from
feature/per-country-year-ranges

Conversation

@Nielsvanpach
Copy link
Copy Markdown
Collaborator

Summary

  • Remove the global 1970–2037 year restriction from Country::ensureYearCanBeCalculated()
  • Add supportedYearRange() method to Country (returns null = unlimited by default)
  • 9 countries with calendar lookup tables declare their actual supported ranges (e.g. Albania 2024–2034, Turkey 1970–2037)
  • ~70 countries with only fixed/Easter-based holidays now support any year
  • ResolvesCalendarDates error messages now derive min/max from the actual lookup data instead of hardcoding 1970/2037

Breaking changes

  • Countries without lookup tables no longer throw for years outside 1970–2037
  • Error messages changed from "Holidays can only be calculated for years after/before X" to "Only years between X and Y are supported for {countryCode}"

@Nielsvanpach Nielsvanpach merged commit 8f1b17a into v2 Feb 25, 2026
12 checks passed
@Nielsvanpach Nielsvanpach deleted the feature/per-country-year-ranges branch February 25, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant