Cldr.Calendar.Interval.quarter

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

Specs

quarter(Date.t()) :: Date.Range.t()

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

The range is enumerable.

Arguments

  • year is any year for calendar

  • quarter is any quarter in the 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 quarter

Examples

iex> Cldr.Calendar.Interval.quarter 2019, 2, Cldr.Calendar.Fiscal.UK
#DateRange<~D[2019-04-01 Cldr.Calendar.Fiscal.UK], ~D[2019-06-30 Cldr.Calendar.Fiscal.UK]>

iex> Cldr.Calendar.Interval.quarter 2019, 2, Cldr.Calendar.ISOWeek
#DateRange<~D[2019-W14-1 Cldr.Calendar.ISOWeek], ~D[2019-W26-7 Cldr.Calendar.ISOWeek]>
Link to this function

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

View Source

Specs