Cldr.DateTime.Formatter.second
You're seeing just the function
second, go back to Cldr.DateTime.Formatter module for more information.
Specs
second(Calendar.time(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the :second of a time or datetime (format symbol s) as number
in string format. The number of s's in the format determines the formatting.
Arguments
timeis aTimestruct or any map that contains at least the key:secondnis the number of digits to which:houris paddedlocaleis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used insecond/4
Format Symbol
The representation of the second is made in accordance with the following
table:
| Symbol | Results | Description |
|---|---|---|
| s | 3, 48 | Minimim digits of seconds |
| ss | "03", "48" | Number of seconds zero-padded to 2 digits |
Examples
iex> Cldr.DateTime.Formatter.second %{second: 23}, 1
"23"
iex> Cldr.DateTime.Formatter.second %{second: 4}, 2
"04"
Specs
second(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}