Massolari/time-distance/1.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/Massolari/time-distance is gone (deleted or private); Software Heritage has not archived the repo; no fork with tag 1.0.0 found (16 same-name repos checked); no cached copy. Use another version.

Details

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.