holidays_ex v0.0.6 HolidaysEx
Documentation for HolidaysEx.
Link to this section Summary
Functions
Generate Map data of Holidays in Japan
Returns a holiday’s all date
Specifying a date returns holiday or not as bool
Specifying a date returns a holiday’s name
Generate JSON data of Holidays in Japan
Specifying a name returns a holiday’s date
Link to this section Functions
Link to this function
all()
Generate Map data of Holidays in Japan.
Examples
iex> HolidaysEx.all
[
{"2017-01-01", "元日"},
{"2017-01-02", "休日"},
{"2017-01-09", "成人の日"}
...
]
Link to this function
dates()
Returns a holiday’s all date.
Examples
iex> HolidaysEx.dates
["2017-01-01", "2017-01-02", "2017-01-09" ...]
Link to this function
holiday?(date)
Specifying a date returns holiday or not as bool.
Examples
iex> HolidaysEx.holiday?("2019-11-03")
true
iex> HolidaysEx.holiday?("2019-11-08")
false
Link to this function
holiday_name(date)
Specifying a date returns a holiday’s name.
Examples
iex> HolidaysEx.holiday_name("2019-11-03")
"文化の日"
Link to this function
to_json()
Generate JSON data of Holidays in Japan.
Examples
iex> HolidaysEx.to_json
"{"2019-11-03":"文化の日","2018-09-23":"秋分の日"...
Link to this function
when?(name)
Specifying a name returns a holiday’s date.
Examples
iex> HolidaysEx.when?("海の日")
["2017-07-17", "2018-07-16", "2019-07-15"]