Cldr.DateTime.Formatter.hour_0_11

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

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

View Source

Specs

hour_0_11(Calendar.time(), integer(), Keyword.t()) ::
  String.t() | {:error, String.t()}

Returns the formatting of the :hour (format symbol K) as a number in the range 0..11 as a string.

Arguments

Format Symbol

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

SymbolMidn.MorningNoonAfternoonMidn.
K01...1101...110

Examples

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 0}
"0"

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 12}
"0"

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 24}
"0"

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 23}
"11"

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 11}
"11"

iex> Cldr.DateTime.Formatter.hour_0_11 %{hour: 9}
"9"
Link to this function

hour_0_11(time, n, locale, backend, options \\ [])

View Source

Specs

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