Calendar.ISO.parse_time

You're seeing just the function parse_time, go back to Calendar.ISO module for more information.
Link to this function

parse_time(string)

View Source (since 1.10.0)

Parses a time string in the :extended format.

For more information on supported strings, see how this module implements ISO 8601.

Examples

iex> Calendar.ISO.parse_time("23:50:07")
{:ok, {23, 50, 7, {0, 0}}}

iex> Calendar.ISO.parse_time("23:50:07Z")
{:ok, {23, 50, 7, {0, 0}}}
iex> Calendar.ISO.parse_time("T23:50:07Z")
{:ok, {23, 50, 7, {0, 0}}}
Link to this function

parse_time(string, format)

View Source (since 1.12.0)

Parses a time string according to a given format.

The format can either be :basic or :extended.

For more information on supported strings, see how this module implements ISO 8601.

Examples

iex> Calendar.ISO.parse_time("235007", :basic)
{:ok, {23, 50, 7, {0, 0}}}
iex> Calendar.ISO.parse_time("235007", :extended)
{:error, :invalid_format}