Calendar.ISO.parse_date

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

parse_date(string)

View Source (since 1.10.0)

Parses a date string in the :extended format.

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

Examples

iex> Calendar.ISO.parse_date("2015-01-23")
{:ok, {2015, 1, 23}}

iex> Calendar.ISO.parse_date("2015:01:23")
{:error, :invalid_format}
iex> Calendar.ISO.parse_date("2015-01-32")
{:error, :invalid_date}
Link to this function

parse_date(string, format)

View Source (since 1.12.0)

Parses a date 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_date("20150123", :basic)
{:ok, {2015, 1, 23}}
iex> Calendar.ISO.parse_date("20150123", :extended)
{:error, :invalid_format}