firestorm
firestorm copied to clipboard
progressively fuzzier timestamps
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 |
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?
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
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