umts / BusInfoBoard

A place to view bus arrival information from Avail's JSON feed
Apache License 2.0
15 stars 3 forks source link

Alternate time-humanizing? #47

Closed werebus closed 7 years ago

werebus commented 7 years ago

I've been playing with #42, and noticed that a lot of the display is devoted to the word, "minutes." It turns out you can customize those strings with your locale settings.

It doesn't change the fact that 45 minutes is an hour, though.

For small screens perhaps:

moment.updateLocale('en', {
    relativeTime : {
        future: "in %s",
        past:   "%s ago",
        s:  "<1 min",
        m:  "1 min",
        mm: "%d mins",
        h:  "1 hr",
        hh: "%d hrs",
        d:  "1 day",
        dd: "%d days",
        M:  "1 mo",
        MM: "%d mos",
        y:  "1 yr",
        yy: "%d yrs"
    }
});
dfaulken commented 7 years ago

Perhaps just translate everything to hours and minutes? We don't show departures more than 2 or 3 hours out anyhow.

dfaulken commented 7 years ago

@Anbranin will write up a feature branch for us to compare this suggestion with the current view.

dfaulken commented 7 years ago

53