Hi!
Date (and friends) can be formatted using either "basic" or "extended"
ISO8601, but parsing is only implemented for the "extended" format.
So one can do:
iex> Date.to_iso8601(~D[2019-07-01]) |> Date.from_iso8601()
{:ok, ~D[2019-07-01]}
but this won't "work":
iex> Date.to_iso8601(~D[2019-07-01], :basic) |> Date.from_iso8601()
{:error, :invalid_format}
Is there any reason for that? Would you accept a PR that adds this feature?
Best,
Stefan
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-core/172d294d-3a56-42e1-873f-deea0cc0880c%40googlegroups.com.