Holidays.jl is a lightweight Julia package designed for determining whether a specific date is a public holiday in a variety of countries. The package supports checking national and regional holidays, making it a perfect fit for applications that require accurate date-based calculations.
- Brazil (including subdivisions)
- Egypt
- Germany (including subdivisions)
- United States
julia> ] add Holidays
using Holidays
using Dates
usa_holidays = Holidays.UnitedStates()
# check if new year's day is a holiday
@show Date(2024, 1, 1) in usa_holidays # true
# check if memorial day is a holiday
@show Date(2024, 5, 27) in usa_holidays # true
# check if thanksgiving day is a holiday
@show Date(2024, 11, 28) in usa_holidays # true
using Holidays
using Dates
# check if april 23rd is a holiday in brazil
brazil_holidays = Holidays.Brazil()
@show Date(2024, 4, 23) in brazil_holidays # false
# check if april 23rd is a holiday specifically in rio de janeiro
rio_holidays = Holidays.Brazil(subdivision = Subdivision.RioDeJaneiro())
@show Date(2024, 4, 23) in rio_holidays # true
using Holidays
calendar = Holidays.UnitedStates()
@show Holidays.find_holidays(calendar, years = [2024, 2025])
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.