Holidays v0.2.4 Holidays View Source

Provides the on function that gives a list of holidays for a date within specified regions.

Dates in Erlang (and therefore Elixir) are represented by the tuple {year, month, day}.

Link to this section Summary

Functions

Wrapper for Holidays.DateCalculator.Easter.gregorian_easter_for(year) so Definition modules don't all need their own copy.

Returns a list of holidays on the given date for the specified regions.

Callback implementation for Application.start/2.

Link to this section Types

Link to this type

week()

View Source
week() :: :first | :second | :third | :fourth | :last
Link to this type

weekday()

View Source
weekday() ::
  :monday | :tuesday | :wednesday | :thursday | :friday | :saturday | :sunday

Link to this section Functions

Wrapper for Holidays.DateCalculator.Easter.gregorian_easter_for(year) so Definition modules don't all need their own copy.

For eample, in Holidays.Definitions.Us, Easter Sunday is defined like this:

holiday "Easter Sunday",
  %{regions: [:us],
    function: {Holidays, :easter, [:year]},
    type: :informal}

Returns a list of holidays on the given date for the specified regions.

Examples

iex> Holidays.on({2016, 1, 1}, [:us])
[%{name: "New Year's Day"}]

Callback implementation for Application.start/2.