Massolari / time-distance / Time.Distance

Library for getting the relative distance between two Time.Posix values, in words.

Time.Distance

inWords : Time.Posix -> Time.Posix -> String

Get the string representing the time interval, defaulting to English, with affixes ("ago"/"in").

The second argument is for the "now" time.

inWordsWithConfig : Types.Config -> Types.Locale -> Time.Posix -> Time.Posix -> String

Get the string representing the time interval, with another language, and/ or without affixes ("ago"/"in").

Config is a type alias for { withAffix : Bool}.