holidays v0.0.4 Holidays

Summary

Functions

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

Types

week :: :first | :second | :third | :fourth | :last
weekday ::
  :monday |
  :tuesday |
  :wednesday |
  :thursday |
  :friday |
  :saturday |
  :sunday

Functions

on(date, regions)

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"}]

Note: The plan is to use compile time code generation (or macros) to produce all clauses of on by pulling from the code in each of several definitions modules like Holidays.Defenitions.Us. However, I started by writing out the implementations explicitly to get the API right and tests in place.