Calendar.ISO.quarter_of_year
You're seeing just the function
quarter_of_year
, go back to Calendar.ISO module for more information.
Specs
quarter_of_year(year(), month(), day()) :: quarter_of_year()
Calculates the quarter of the year from the given year
, month
, and day
.
It is an integer from 1 to 4.
Examples
iex> Calendar.ISO.quarter_of_year(2016, 1, 31)
1
iex> Calendar.ISO.quarter_of_year(2016, 4, 3)
2
iex> Calendar.ISO.quarter_of_year(-99, 9, 31)
3
iex> Calendar.ISO.quarter_of_year(2018, 12, 28)
4