1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

ui: Get UI to compile with Elm 0.19

This commit is contained in:
James Hillyerd
2018-11-13 22:03:36 -08:00
parent 5ccdece541
commit fe20854173
15 changed files with 210 additions and 180 deletions

View File

@@ -1,21 +1,11 @@
module Data.Date exposing (date)
import Date exposing (Date)
import Json.Decode as Decode exposing (..)
import Time exposing (Posix)
{-| Decode an ISO 8601 date
{-| Decode a POSIX milliseconds timestamp. Currently faked until backend API is updated.
-}
date : Decoder Date
date : Decoder Posix
date =
let
convert : String -> Decoder Date
convert raw =
case Date.fromString raw of
Ok date ->
succeed date
Err error ->
fail error
in
string |> andThen convert
succeed (Time.millisToPosix 0)