Date.day_of_year
You're seeing just the function
day_of_year
, go back to Date module for more information.
Specs
day_of_year(Calendar.date()) :: Calendar.day()
Calculates the day 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 366.
Examples
iex> Date.day_of_year(~D[2016-01-01])
1
iex> Date.day_of_year(~D[2016-11-01])
306
iex> Date.day_of_year(~D[-0015-10-30])
303
iex> Date.day_of_year(~D[2004-12-31])
366