Cldr.Calendar.date_to_iso_days

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

Specs

date_to_iso_days(Date.t()) :: iso_day_number()

Returns the number of days since the start of the epoch.

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

Argumenets

  • date is any Date.t()

Returns

  • The integer number of days since the epoch for the given date.

Example

iex> Cldr.Calendar.date_to_iso_days ~D[2019-01-01]
737425

iex> Cldr.Calendar.date_to_iso_days ~D[0001-01-01]
366

iex> Cldr.Calendar.date_to_iso_days ~D[0000-01-01]
0