module Model.Date ( timeDecoder , dateDecoder ) where import Date as Date exposing (Date) import Time exposing (Time) import Json.Decode as Json exposing (..) timeDecoder : Decoder Time timeDecoder = Json.map Date.toTime dateDecoder dateDecoder : Decoder Date dateDecoder = customDecoder string Date.fromString