Cldr.DateTime.Formatter.hour
You're seeing just the function
hour
, go back to Cldr.DateTime.Formatter module for more information.
Specs
hour(Calendar.time(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the hour formatted in a locale-specific format
Arguments
time
is aTime
struct or any map that contains at least the key:hour
n
is the number of digits to which:hour
is paddedlocale
is any valid locale name returned byCldr.known_locale_names/0
or aCldr.LanguageTag
struct. The default isCldr.get_locale/0
options
is aKeyword
list of options. There are no options used inhour/4
Examples
iex> Cldr.DateTime.Formatter.hour ~N[2020-04-25 15:00:00.0]
"3"
iex> Cldr.DateTime.Formatter.hour ~N[2020-04-25 15:00:00.0], locale: "fr"
"15"
iex> Cldr.DateTime.Formatter.hour ~N[2020-04-25 15:00:00.0], locale: "en-AU"
"3"
iex> Cldr.DateTime.Formatter.hour ~N[2020-04-25 15:00:00.0], locale: "en-AU-u-hc-h23"
"15"
Specs
hour(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}