Cldr.Calendar.date_from_iso_days

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

date_from_iso_days(iso_day_number, calendar)

View Source

Specs

date_from_iso_days(Calendar.iso_days() | iso_day_number(), calendar()) ::
  Date.t()

Returns a date represented by a number of days since the start of the epoch.

The start of the epoch is the date 0000-01-01.

Argumenets

  • iso_days is an integer representing the number of days since the start of the epoch.

  • calendar is any module that implements the Calendar and Cldr.Calendar behaviours

Returns

  • a Date.t()

Example

iex> Cldr.Calendar.date_from_iso_days 737425, Calendar.ISO
~D[2019-01-01]

iex> Cldr.Calendar.date_from_iso_days 366, Calendar.ISO
~D[0001-01-01]

iex> Cldr.Calendar.date_from_iso_days 0, Calendar.ISO
~D[0000-01-01]