Holocene Calendar v0.1.0 HoloceneCalendar View Source

A calendar implementation of the holocene calendar. See https://en.wikipedia.org/wiki/Holocene_calendar.

The holocene or human calendar adds an extra 10.000 years to the default ISO calendar. The implementation uses Calendar.ISO internally.

Examples:

iex> ~D[2019-01-01] |> Date.convert(HoloceneCalendar)
{:ok, %Date{calendar: HoloceneCalendar, day: 1, month: 1, year: 12019}}

iex> ~D[-9999-01-01] |> Date.convert(HoloceneCalendar)
{:ok, %Date{calendar: HoloceneCalendar, day: 1, month: 1, year: 1}}

iex> %Date{calendar: HoloceneCalendar, day: 1, month: 1, year: 12019} |> Date.to_string
"12019-01-01"

Link to this section Summary

Link to this section Types