elm-bridge
elm-bridge copied to clipboard
Add parser for decoding UTC datatypes
It requires the elm-community/json-extra package for now.
It would be great if:
- it would be imported by json-helpers so that using this library only requires adding one dependency
- it added the decoder
- would import
Posix - would use https://package.elm-lang.org/packages/rtfeldman/elm-iso8601-date-strings/latest/Iso8601 as it's more minimal
Our current workaround is:
"import Time exposing (Posix)",
"import Iso8601",
"jsonDecPosix : Json.Decode.Decoder Posix",
"jsonDecPosix = Iso8601.decoder",
"",
"jsonEncPosix : Posix -> Value",
"jsonEncPosix = Iso8601.encode",