holidefs v0.2.0 Holidefs View Source
Holdefs is a holiday OTP application for multiple locales that loads the dates from definition files on the startup.
Link to this section Summary
Functions
Returns all the holidays for the given locale between start and finish dates
Returns the language to translate the holiday names to
Returns a map of all the supported locales
Returns all the holidays for the given locale on the given date
Sets the language to translate the holiday names to
Returns all the holidays for the given year
Link to this section Types
Link to this section Functions
between(atom(), Date.t(), Date.t(), Holidefs.Options.t()) :: {:ok, [Holidefs.Holiday.t()]} | {:error, error_reasons()}
Returns all the holidays for the given locale between start and finish dates.
If succeed returns a {:ok, holidays}
tuple, otherwise
returns a {:error, reason}
tuple
Returns the language to translate the holiday names to.
Returns a map of all the supported locales.
The key is the code and the value the name of the locale.
on(atom(), Date.t(), Holidefs.Options.t()) :: {:ok, [Holidefs.Holiday.t()]} | {:error, error_reasons()}
Returns all the holidays for the given locale on the given date.
If succeed returns a {:ok, holidays}
tuple, otherwise
returns a {:error, reason}
tuple.
Sets the language to translate the holiday names to.
To use the native language names, you can set the language to :orig
year(atom(), integer(), Holidefs.Options.t()) :: {:ok, [Holidefs.Holiday.t()]} | {:error, error_reasons()}
Returns all the holidays for the given year.
If succeed returns a {:ok, holidays}
tuple, otherwise
returns a {:error, reason}
tuple