Cldr.DateTime.Formatter.minute
You're seeing just the function
minute
, go back to Cldr.DateTime.Formatter module for more information.
Specs
minute(Calendar.time(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the :minute
of a time
or datetime
(format symbol m
) as number
in string format. The number of m
's in the format determines the formatting.
Arguments
time
is aTime
struct or any map that contains at least the key:minute
n
is the number of digits to which:minute
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 inminute/4
Format Symbol
The representation of the minute
is made in accordance with the following
table:
Symbol | Results | Description |
---|---|---|
m | 3, 10 | Minimim digits of minutes |
mm | "03", "12" | Number of minutes zero-padded to 2 digits |
Examples
iex> Cldr.DateTime.Formatter.minute %{minute: 3}, 1
3
iex> Cldr.DateTime.Formatter.minute %{minute: 3}, 2
"03"
Specs
minute(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}