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.
Link to this function

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

View Source

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

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.

SymbolExampleCldr Format
d2, 22
dd02, 22
ddd2nd, 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"
Link to this function

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

View Source

Specs

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