gingko/time-distance/2.1.0

NOTE: the latest version is 2.4.0

Time.Distance

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

Time.Distance

inWords : Posix -> 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 : Config -> Locale -> Posix -> 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}.