Cldr.Calendar.first_gregorian_day_of_year

You're seeing just the function first_gregorian_day_of_year, go back to Cldr.Calendar module for more information.
Link to this function

first_gregorian_day_of_year(map)

View Source
Link to this function

first_gregorian_day_of_year(year, calendar)

View Source

Specs

first_gregorian_day_of_year(Calendar.year(), calendar()) ::
  Date.t() | {:error, :invalid_date}

Returns the gregorian date of the first day of of a year for a calendar.

Arguments

Examples

iex> Cldr.Calendar.first_gregorian_day_of_year 2019, Cldr.Calendar.Gregorian
%Date{calendar: Cldr.Calendar.Gregorian, day: 1, month: 1, year: 2019}

iex> Cldr.Calendar.first_gregorian_day_of_year 2019, Cldr.Calendar.NRF
%Date{calendar: Cldr.Calendar.Gregorian, day: 3, month: 2, year: 2019}

iex> Cldr.Calendar.first_gregorian_day_of_year ~D[2019-12-01]
~D[2019-01-01]