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.
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
dateis aDatestruct or any map that contains at least the keys:year,:month,:dayand:calendarnin an integer between 1 and 3 that determines the format of the day of yearlocaleis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used inday_of_year/4
Format Symbol
The representation of the day of the year is made in accordance with the following table:
| Symbol | Example | Cldr Format |
|---|---|---|
| D | 3, 33, 333 | |
| DD | 03, 33, 333 | |
| DDD | 003, 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"
Specs
day_of_year(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}