Cldr.DateTime.Formatter.day_of_week

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

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

View Source

Specs

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

Returns the local day of week (format symbol e) as a number or name.

Arguments

Notes

Returns the same as format symbol E except that it adds a numeric value that will depend on the local starting day of the week.

Format Symbol

The representation of the time period is made in accordance with the following table:

SymbolExampleCldr Format
e2Single digit
ee"02"Two digits
eee"Tue"Abbreviated
eeee"Tuesday"Wide
eeeee"T"Narrow
eeeeee"Tu"Short

Examples

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 3
"Tue"

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 4
"Tuesday"

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 5
"T"

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 6
"Tu"

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 1
"2"

iex> Cldr.DateTime.Formatter.day_of_week ~D[2017-08-15], 2
"02"
Link to this function

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

View Source

Specs

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