holidefs v0.3.2 Holidefs.Options View Source

Here is the list of options you can send to Holidefs functions:

  • regions - a list of strings to define what region will be loaded. When empty it fallbacks to the basic region of the locale, which is the region with the same code of the locale. Defaults to []
  • include_informal? - flag to include the informal holidays on the return list. Defaults to false
  • observed? - flag to consider the observed_date of the holidays as the date. Defaults to false

Link to this section Summary


Builds a new Options struct with normalized fields.

Link to this section Types


attrs() :: [] | Keyword.t() | map()


t() :: %Holidefs.Options{
  include_informal?: boolean(),
  observed?: boolean(),
  regions: [String.t()]

Link to this section Functions

Link to this function

build(attrs, definition)

View Source


build(attrs(), Holidefs.Definition.t()) :: t()

Builds a new Options struct with normalized fields.

The definition is used to get the all the regions and code.