Skip to content
togglPublic

About

Definition-based national holidays in Elixir

Resources

Code of conduct

Contributing

Stars

32 stars

Watchers

16 watching

Forks

Repository files navigation

Holidefs

CI Module Version Hex Docs Total Download License Last Updated

Definition-based national holidays in Elixir.

Installation

The package can be installed by adding :holidefs to your list of dependencies in mix.exs:

def deps do
  [
    {:holidefs, "~> 0.4"}
  ]
end

Usage

To get holidays from you country you can use the functions on Holidefs module, like this:

Holidefs.between(:br, ~D[2018-03-01], ~D[2018-04-01])
# => {:ok, [%Holidefs.Holiday{name: "Good Friday", ...}, ...]}

See Holidefs doc to the complete list of functions.

Also, for all these functions you can give a list of options like this:

Holidefs.between(:br, ~D[2018-02-01], ~D[2018-04-03], include_informal?: true)
# => {:ok, [%Holidefs.Holiday{name: "Good Friday", ...}, ...]}

For the complete list of options and their meaning check Holidefs.Options doc

License

Copyright (c) 2022 Toggl

This software is released under the MIT License.

About

Definition-based national holidays in Elixir

Resources

Code of conduct

Contributing

Stars

32 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages