Cldr.DateTime.Formatter.second

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

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

View Source

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

Format Symbol

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

SymbolResultsDescription
s3, 48Minimim 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"
Link to this function

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

View Source

Specs

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