Cldr.DateTime.Formatter.standalone_quarter

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

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

View Source

Specs

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

Returns the standalone quarter (format symbol a) of a date for given locale.

Arguments

Format Symbol

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

SymbolExampleCldr Format
q2Single digit
qq"02"Two digits
qqq"Q2"Abbreviated
qqqq"2nd quarter"Wide
qqqqq"2"Narrow

Examples

iex> Cldr.DateTime.Formatter.standalone_quarter ~D[2019-06-08], 1
2

iex> Cldr.DateTime.Formatter.standalone_quarter ~D[2019-06-08], 2
"02"

iex> Cldr.DateTime.Formatter.standalone_quarter ~D[2019-06-08], 3
"Q2"

iex> Cldr.DateTime.Formatter.standalone_quarter ~D[2019-06-08], 4
"2nd quarter"

iex> Cldr.DateTime.Formatter.standalone_quarter ~D[2019-06-08], 5
"2"
Link to this function

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

View Source

Specs

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