ringvold/elm-iso8601-date-strings/1.0.2

Rerouted (cache, verified). The original is gone. This copy comes from a Lamdera package cache made before it went. The Lamdera package server serves a copy recovered from a Lamdera package cache from 2021-02-13.

What we checked: Rebuilt from the unpacked sources in a Lamdera package cache (5 copies agree), which Elm only writes after the published SHA-1 checked out; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/ringvold/elm-iso8601-date-strings/zipball/1.0.2/

Iso8601

Convert between ISO-8601 date strings and POSIX times.

fromTime : Posix -> String

Inflate a Posix integer into a more memory-intensive ISO-8601 date string.

It's generally best to avoid doing this unless an external API requires it.

(UTC integers are less error-prone, take up less memory, and are more efficient for time arithmetic.)

Format: YYYY-MM-DDTHH:mm:ss.SSSZ

toTime : String -> Result (List DeadEnd) Posix

Convert from an ISO-8601 date string to a Time.Posix value.

ISO-8601 date strings sometimes specify things in UTC. Other times, they specify a non-UTC time as well as a UTC offset. Regardless of which format the ISO-8601 string uses, this function normalizes it and returns a time in UTC.

decoder : Decoder Posix

Decode an ISO-8601 date string to a Time.Posix value using toTime.

encode : Posix -> Value

Encode a Time.Posix value as an ISO-8601 date string using fromTime.