Cldr.Calendar.Interval.year

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

Specs

year(Date.t()) :: Date.Range.t()

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

The range is enumerable.

Arguments

  • year is any year for calendar

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

Returns

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

Examples

iex> Cldr.Calendar.Interval.year 2019, Cldr.Calendar.Fiscal.UK
#DateRange<~D[2019-01-01 Cldr.Calendar.Fiscal.UK], ~D[2019-12-31 Cldr.Calendar.Fiscal.UK]>

iex> Cldr.Calendar.Interval.year 2019, Cldr.Calendar.NRF
#DateRange<~D[2019-W01-1 Cldr.Calendar.NRF], ~D[2019-W52-7 Cldr.Calendar.NRF]>
Link to this function

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

View Source

Specs