Cldr.DateTime.Formatter.day_of_month
You're seeing just the function
day_of_month, go back to Cldr.DateTime.Formatter module for more information.
Specs
day_of_month(Calendar.date(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the day of the month (symbol d) as an integer.
Arguments
dateis aDatestruct or any map that contains at least the keys:year,:month,:dayand:calendarnin an integer between 1 and 2 that determines the format of the day of monthlocaleis 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_month/4
Format Symbol
The representation of the day of the month is made in accordance
with the following table. Note that ddd is not part of the CLDR
standard.
| Symbol | Example | Cldr Format |
|---|---|---|
| d | 2, 22 | |
| dd | 02, 22 | |
| ddd | 2nd, 22nd |
Examples
iex> Cldr.DateTime.Formatter.day_of_month ~D[2017-01-04], 1
4
iex> Cldr.DateTime.Formatter.day_of_month ~D[2017-01-04], 2
"04"
iex> Cldr.DateTime.Formatter.day_of_month ~D[2017-01-04], 3
"4th"
Specs
day_of_month(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}