Cldr.DateTime.Formatter.hour_0_23

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

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

View Source

Specs

hour_0_23(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 0..23 as a string.

Arguments

Format Symbol

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

SymbolMidn.MorningNoonAfternoonMidn.
H01...111213...230

Examples:

iex> Cldr.DateTime.Formatter.hour_0_23 %{hour: 10}
"10"

iex> Cldr.DateTime.Formatter.hour_0_23 %{hour: 13}
"13"

iex> Cldr.DateTime.Formatter.hour_0_23 %{hour: 21}
"21"

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

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

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

View Source

Specs

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