View Source Holidex.Countries.Canada (Holidex v0.1.5)
Provides public holiday dates and observances for Canadian holidays. Each province and territory in Canada has the authority to establish its own holiday schedule and observance rules.
Summary
Functions
Retrieves detailed information about all available regions.
Types
@type year() :: 1900..2200
Functions
@spec holidays(year()) :: [Holidex.NationalHoliday.t()]
@spec region_codes() :: [atom()]
@spec regions() :: [map()]
Retrieves detailed information about all available regions.
This function returns a list of maps, each containing detailed information about a specific region, including its name, region type, and region code.
Returns
list(map())
- A list of maps, each representing a region with the following keys::name
- The name of the region (string):region_type
- The type of the region (atom, e.g., :province, :state):region_code
- The code for the region (atom)
Examples
iex> Holidex.Countries.Canada.regions()
[
%{name: "Alberta", region_type: :province, region_code: "ab"},
%{name: "British Columbia", region_type: :province, region_code: "bc"},
...
]