jweir / elm-iso8601

Elm library to parse and convert ISO8601 times and dates
https://package.elm-lang.org/packages/jweir/elm-iso8601/latest
MIT License
15 stars 7 forks source link

Passing empty string to ISO8601.fromString should return an error #11

Closed girishso closed 6 years ago

girishso commented 6 years ago

Currently, if we pass an empty string to ISO8601.fromString it returns invalid time

> ISO8601.fromString ""
Ok { day = 1, hour = 0, millisecond = 0, minute = 0, month = 1, offset = (0,0), second = 0, year = 0 }
    : Result String ISO8601.Time

It should return an error.

jweir commented 6 years ago

This is patched for Elm 0.19

And if you need Elm 0.18 support try to install: https://package.elm-lang.org/packages/jweir/elm-iso8601/4.0.4

I don't know if that will work or not - I am not having a good time trying to get the 0.18 package to publish properly.

jweir commented 6 years ago

And thanks for the bug report! Close this out of if it looks good to you.

girishso commented 6 years ago

Thanks @jweir ! We're using 0.19.