holidefs v0.1.0 Holidefs.Definition View Source

A definition is a set of rules for the holiday events in the year.

Link to this section Summary

Functions

Loads the definition for a locale code and name

Returns the path where all the locale definitions are saved

Link to this section Types

Link to this type t() View Source
t() :: %Holidefs.Definition{
  code: String.t(),
  name: String.t(),
  rules: [Holidefs.Definition.Rule.t()]
}

Link to this section Functions

Link to this function file_path(code, path \\ "/Users/kelvinst/Code/teamweek/holidefs/_build/dev/lib/holidefs/priv/calendars/definitions") View Source
file_path(Atom.t(), Path.t()) :: Path.t()

Returns the path for the given locale definition file

Link to this function load!(code, name) View Source
load!(Atom.t(), String.t()) :: t()

Loads the definition for a locale code and name.

If any definition rule is invalid, a RuntimeError will be raised

Returns the path where all the locale definitions are saved