Date.quarter_of_year

You're seeing just the function quarter_of_year, go back to Date module for more information.
Link to this function

quarter_of_year(date)

View Source (since 1.8.0)

Specs

quarter_of_year(Calendar.date()) :: non_neg_integer()

Calculates the quarter of the year of a given date.

Returns the day of the year as an integer. For the ISO 8601 calendar (the default), it is an integer from 1 to 4.

Examples

iex> Date.quarter_of_year(~D[2016-10-31])
4
iex> Date.quarter_of_year(~D[2016-01-01])
1
iex> Date.quarter_of_year(~N[2016-04-01 01:23:45])
2
iex> Date.quarter_of_year(~D[-0015-09-30])
3