Calendar v0.13.1 Calendar.Time.Parse
Summary
Functions
Parses ISO 8601 time strings.
The function accepts both the extended and the basic format.
Examples
# Extended format
iex> iso8601("13:07:58")
{:ok, %Calendar.Time{hour: 13, min: 7, sec: 58}}
# Basic format (the basic format does not have colons)
iex> iso8601("130758")
{:ok, %Calendar.Time{hour: 13, min: 7, sec: 58}}
iex> iso8601("25:65:00")
{:error, :invalid_time}