feiertag
Calculate state holidays on the fly
gleam add feiertag@1
import feiertag.{Austria}
import gleam/io
pub fn main() {
io.println("is x-mas a state holiday in austria?")
case feiertag.is_holiday(Austria, 2025, 12, 25) {
True -> io.println("yes!!! x-mas is a holiday :D")
False -> io.println("no :( x-mas is not a holiday")
}
io.println("how is x-mas called in austria?")
case feiertag.get_holiday(Austria, 2025, 12, 25) {
Ok(name) -> io.println("the austrian people call x-mas: " <> name)
Error(_) -> io.println("we have zero idea what the austrians say or do :/")
}
}
Further documentation can be found at https://hexdocs.pm/feiertag.
Currently supported Countries
- Austria
Adding a country should be fairly simple PRs are welcome <3
Development
gleam run # Run the project
gleam test # Run the tests