Cldr.DateTime.Formatter.day_of_year

You're seeing just the function day_of_year, go back to Cldr.DateTime.Formatter module for more information.
Link to this function

day_of_year(day_of_year, n \\ 1, options \\ [])

View Source

Specs

day_of_year(Calendar.date(), integer(), Keyword.t()) ::
  String.t() | {:error, String.t()}

Returns the day of the year (symbol D) as an integer in string format.

Arguments

Format Symbol

The representation of the day of the year is made in accordance with the following table:

SymbolExampleCldr Format
D3, 33, 333
DD03, 33, 333
DDD003, 033, 333

Examples

iex> Cldr.DateTime.Formatter.day_of_year ~D[2017-01-15], 1
"15"

iex> Cldr.DateTime.Formatter.day_of_year ~D[2017-01-15], 2
"15"

iex> Cldr.DateTime.Formatter.day_of_year ~D[2017-01-15], 3
"015"
Link to this function

day_of_year(date, n, locale, backend, options \\ [])

View Source

Specs

day_of_year(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) ::
  String.t() | {:error, String.t()}