Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Holidays
Description
This module determines public holidays based on country code and year.
Synopsis
- type ISO_3166_1_Alpha_3 = Text
- type Region = Text
- holidays :: ISO_3166_1_Alpha_3 -> [Region] -> Year -> Set Holiday
- hday :: Text -> Day -> Holiday
- data Holiday = Holiday {
- holidayKey :: Text
- holidayValue :: Day
Documentation
type ISO_3166_1_Alpha_3 = Text Source #
3-letter country codes.
holidays :: ISO_3166_1_Alpha_3 -> [Region] -> Year -> Set Holiday Source #
Returns a set of public holidays based on the country code (ISO_3166_1_Alpha_3) and a specific year. If a country is not supported an empty set is returned. Country regions are also supported.
Examples:
holidays "DEU" ["BW","BY","BE"] 2025 -- Germany and various regions holidays "USA" [] 2025