Calendar.ISO.time_to_string
You're seeing just the function
time_to_string
, go back to Calendar.ISO module for more information.
Link to this function
time_to_string(hour, minute, second, microsecond, format \\ :extended)
View Source (since 1.5.0)Specs
time_to_string( Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond(), :basic | :extended ) :: String.t()
Converts the given time into a string.
By default, returns times formatted in the "extended" format,
for human readability. It also supports the "basic" format
by passing the :basic
option.
Examples
iex> Calendar.ISO.time_to_string(2, 2, 2, {2, 6})
"02:02:02.000002"
iex> Calendar.ISO.time_to_string(2, 2, 2, {2, 2})
"02:02:02.00"
iex> Calendar.ISO.time_to_string(2, 2, 2, {2, 0})
"02:02:02"
iex> Calendar.ISO.time_to_string(2, 2, 2, {2, 6}, :basic)
"020202.000002"
iex> Calendar.ISO.time_to_string(2, 2, 2, {2, 6}, :extended)
"02:02:02.000002"