Cldr.Calendar.day_of_era

You're seeing just the function day_of_era, go back to Cldr.Calendar module for more information.

Specs

day_of_era(Date.t()) :: {Calendar.day(), Calendar.era()}

Returns the {day_of_era, era} for a date.

Arguments

  • date is any Date.t()

Returns

  • a the days since the start of the era and the era of the year as a tuple

Examples

iex> Cldr.Calendar.day_of_era ~D[2019-01-01]
{737060, 1}

iex> Cldr.Calendar.day_of_era Cldr.Calendar.first_day_of_year(2019, Cldr.Calendar.NRF)
{737093, 1}

iex> Cldr.Calendar.day_of_era Cldr.Calendar.last_day_of_year(2019, Cldr.Calendar.NRF)
{737456, 1}