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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user