Holidex
Holidex provides a purely functional API to retrieve public holidays by country. Effortlessly integrate holiday information into your applications.
Installation
If available in Hex, the package can be installed
by adding holidex to your list of dependencies in mix.exs:
def deps do
[
{:holidex, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/holidex.
Features
-
Provides Canadian holiday names and dates with a distinction between the official
dateof the holiday and theobservance_date, which are usually different when the holiday falls on a weekend. The named propertyobservance_dateis subject to change since I don't believe it's the proper way to express this distinction. -
Each holiday will have a
regions_observedkey that lists which provinces consider the holiday statutory. When the holiday is observed nationally, theregions_observedkey will be set toallandnational_public_holidaywill betrue. regional_namesprovides localized names for holidays in different regions. As an example,Civic Holidayin Ontario is referred to asBritish Columbia Dayin British Columbia.
Getting Started
The quickest way to get started is exploring the API in iex:
$ iex -S mixiex(1)> Holidex.Countries.Canada.holidays(2025)iex(2)> Holidex.Countries.Canada.holidays_by_region(2025)Disclaimer
This project is in active development. Breaking changes are expected until the 1.0 release. We appreciate your understanding and encourage you to contribute to the project during this phase.
Contributing
We welcome contributions from the community! Whether it's a bug fix, new feature, or improvement, your input is valuable.
How to Contribute
Open an Issue: Before you start working on your contribution, please open an issue to describe your suggestion or bug report. This helps us discuss the changes and guide you through the process.
License
MIT