gingko/time-distance/2.3.1

NOTE: the latest version is 2.4.0

Time.Distance.Types

Types to allow you to write your own functions. Note that if you are doing this yourself (instead of importing translations from a server), it'd be helpful if you make a PR or a comment on the repo so I can make the language available for others.

Time.Distance.Types

= LessThanXSeconds Int
| HalfAMinute
| LessThanXMinutes Int
| XMinutes Int
| AboutXHours Int
| XDays Int
| AboutXMonths Int
| XMonths Int
| AboutXYears Int
| OverXYears Int
| AlmostXYears Int

All available time intervals.

type Tense
= Past
| Future

Is this a time in the past, or the future?

type alias Config =
{ withAffix : Bool }

Should we include affix ("... ago", "in ...")?

type alias Locale =
Config -> Tense -> DistanceId -> String

Main function type : take all the above, return a string.