Cldr.DateTime.Formatter.hour_1_12

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

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

View Source

Specs

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

Returns the formatting of the :hour (format symbol h) as a number in the range 1..12 as a string.

Arguments

Format Symbol

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

SymbolMidn.MorningNoonAfternoonMidn.
h121...11121...1112

Examples

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

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

iex> Cldr.DateTime.Formatter.hour_1_12 %{hour: 24}
"12"

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

iex> Cldr.DateTime.Formatter.hour_1_12 %{hour: 23}
"11"
Link to this function

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

View Source

Specs

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