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


day(Date.t()) :: Date.Range.t()

Returns a Date.Range.t that represents the day.

The range is enumerable.


  • year is any year for calendar

  • day is any day in the year for calendar

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


  • A Date.Range.t() representing the the enumerable days in the week


iex> 2019, 52, Cldr.Calendar.Fiscal.US
#DateRange<~D[2019-02-21 Cldr.Calendar.Fiscal.US], ~D[2019-02-21 Cldr.Calendar.Fiscal.US]>

iex> 2019, 92, Cldr.Calendar.NRF
#DateRange<~D[2019-W14-1 Cldr.Calendar.NRF], ~D[2019-W14-1 Cldr.Calendar.NRF]> 2019, 8, Cldr.Calendar.ISOWeek
#DateRange<%Date{calendar: Cldr.Calendar.ISOWeek, day: 1, month: 2, year: 2019}, %Date{calendar: Cldr.Calendar.ISOWeek, day: 1, month: 2, year: 2019}>
Link to this function

day(year, day, calendar \\ Cldr.Calendar.Gregorian)

View Source