henriquecbuss/elm-eos/1.0.1

NOTE: the latest version is 1.1.0

Formerly NeoVier/elm-eos. Search finds this package by either name.

Eos.TimePoint

TimePoint encodes a point in time in microseconds.

A point in time in microseconds.

Converting to and from microseconds

Convert microseconds to a TimePoint.

Convert a TimePoint to microseconds.

Converting to and from Time.Posix

toPosix : TimePoint -> Posix

Convert a TimePoint to a Time.Posix. Since Time.Posix uses milliseconds and EOSIO uses microseconds, you may lose some information.

fromPosix : Posix -> TimePoint

Convert a Time.Posix to a TimePoint. Since Time.Posix uses milliseconds and EOSIO uses microseconds, you may lose some information.

Dealing with JSON

encode : TimePoint -> Value

Encode a TimePoint into JSON. You can use this to send a TimePoint to the blockchain or some server.

decoder : Decoder TimePoint

Decode a TimePoint from JSON. You can use this to receive a TimePoint from the blockchain or some server.