elm-iso8601-date-strings
elm-iso8601-date-strings copied to clipboard
Convert between ISO-8601 date strings and Time.Posix
Readme says > If it encounters a UTC offset in the string, it normalizes and discards it such that the resulting Time.Posix value is in UTC no matter what. The...
`Iso8601.toTime "2000-01-00"` returns`Ok (Posix 946598400000)` `Iso8601.toTime "2000-01-00" == Iso8601.toTime "1999-12-31"` returns `True` Ellie: https://ellie-app.com/hdDM5pmSv4Xa1 (edited)
Fix for https://github.com/rtfeldman/elm-iso8601-date-strings/issues/29
As described in #21, we should ensure that all forms of [calendar date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) are supported. This PR adds test cases for those date string forms.
Closes #21 This PR adds support for `YYYY-MM` date strings and its variants.
Code here: https://github.com/rtfeldman/elm-iso8601-date-strings/blob/3587ff12251261514d0da49837f3c170d0249448/src/Iso8601.elm#L342-L345 Might be: ```elm multiplier * (hours * 60 + minutes) ```
Closes #31 Currently the `utcOffsetMinutesFromParts` helper calculates the offset incorrectly by a slim margin, but enough to be concerning, when provided with negative timestamps such as those in the tests...
[According to Wikipedia](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) at least, it's valid to specify a month only, without a specific day, ie `YYYY-MM` only. I have an API I'm working with that returns months in...