firestorm icon indicating copy to clipboard operation
firestorm copied to clipboard

progressively fuzzier timestamps

Open Trevoke opened this issue 7 years ago • 3 comments

Right now they're just rounded to something relatively meaningful but, for instance, there's a thread from 13 days ago. That's too much effort, it's just two weeks, who cares that it's not 15 days?

when it happened what I want to read
just now a few seconds ago
45 seconds ago 45 seconds ago
4 minutes ago 4 minutes ago
1h50 min ago 2 hours ago
6 days ago 1 week ago
13 days ago 2 weeks ago
1 month and 26 days ago 2 months ago

Trevoke avatar Mar 08 '17 23:03 Trevoke

We're using moment.js for the fuzzy time replacement on the frontend right now. What are the odds that this is easy to configure there?

knewter avatar Mar 10 '17 18:03 knewter

It looks like http://momentjs.com/docs/#/displaying/tonow/ is how it's configured by default and it does some kind of increasing fuzziness, just not "what I want".

It looks like there's some element of "customizing thresholds" : http://momentjs.com/docs/#/customization/relative-time-threshold/ but they don't do "weeks" apparently ?

There's a plugin that rounds a date time to a given interval, which might be useful: http://momentjs.com/docs/#/plugins/round/

(of course, since the library already does that, just not how I want, maybe we can ignore this.. Or ask the community

Trevoke avatar Mar 10 '17 19:03 Trevoke

I've applied a 'feedback requested' label and for now am removing this from the alpha milestone since it's kind of ok but I agree it's a bit silly

knewter avatar Mar 11 '17 07:03 knewter