Access to the holiday dataset in priv/data/holidays.json.
The file is decoded once into :persistent_term on first use. Rules for a
country, state and region are merged the way the reference implementation
merges them and cached per selection, so repeated calls are cheap.
Codes are what the dataset uses: uppercase ISO 3166-1 country codes and the
upstream state and region codes ("CA", "BY", "07", "KATH"). Country
codes given as atoms or in lowercase are accepted.
Summary
Types
Country, state and region selection.
Functions
The country entry, or the state or region entry when selected.
A field looked up from the region, then the state, then the country, the first one that has it. The reference implementation never reaches the region level here because of a typo; dayoff does.
The decoded dataset: holidays by country code and the shared names.
The rules for a selection: country rules, then the state's, then the
region's, each level overriding by exact rule string, false deleting a
rule, and _name references resolved from the shared names. Cached.
Normalizes a country, state and region into a selection, raising
ArgumentError with the known codes when something doesn't exist.
What mix dayoff.sync recorded about the upstream commits.
Types
Functions
The country entry, or the state or region entry when selected.
A field looked up from the region, then the state, then the country, the first one that has it. The reference implementation never reaches the region level here because of a typo; dayoff does.
@spec raw() :: map()
The decoded dataset: holidays by country code and the shared names.
The rules for a selection: country rules, then the state's, then the
region's, each level overriding by exact rule string, false deleting a
rule, and _name references resolved from the shared names. Cached.
Normalizes a country, state and region into a selection, raising
ArgumentError with the known codes when something doesn't exist.
country may carry the state and region separated by dashes ("US-CA",
"DE-BY-A"), as the reference implementation allows.
@spec version() :: map()
What mix dayoff.sync recorded about the upstream commits.