Cldr.DateTime.Formatter.month
You're seeing just the function
month, go back to Cldr.DateTime.Formatter module for more information.
Specs
month(Calendar.date(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the month (format symbol M) of a date
for given locale.
Arguments
dateis aDatestruct or any map that contains at least the keys:monthand:calendarnin an integer between 1 and 5 that determines the format of the 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 inmonth/4
Format Symbol
The representation of the month is made in accordance with the following table:
| Symbol | Example | Cldr Format |
|---|---|---|
| M | 9 | Single digit |
| MM | "09" | Two digits |
| MMM | "Sep" | Abbreviated |
| MMMM | "September" | Wide |
| MMMMM | "S" | Narrow |
Examples
iex> Cldr.DateTime.Formatter.month ~D[2019-09-08]
9
iex> Cldr.DateTime.Formatter.month ~D[2019-09-08], 2
"09"
iex> Cldr.DateTime.Formatter.month ~D[2019-09-08], 3
"Sep"
iex> Cldr.DateTime.Formatter.month ~D[2019-09-08], 4
"September"
iex> Cldr.DateTime.Formatter.month ~D[2019-09-08], 5
"S"
Specs
month(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}