Page MenuHomePhabricator

Timeline: 'time between' math incorrect
Open, LowPublic

Description

Says 2 days when it should sat 12 hours: https://tools.wmflabs.org/interaction-timeline/?wiki=dewiki&user=Flo%20Sorg&user=Hajo-Muc&startDate=1509577200&endDate=1520809200

the last edits on the bottom of this example

Event Timeline

Niharika removed a project: Anti-Harassment.
Niharika subscribed.

The example is incorrect because the time difference is ~36 hours and not 12. Moment rounds that up to 2 days.

@Niharika How important do you think it is to fix this?

There's a discussion around a feature request for this in moment.js, including some workarounds here. I'm not sure how practical a workaround would be, given the need for internationalization (e.g. some particular breakdown of days/hours that is more readable in English may not be in every language).

If we think the rounding is confusing, could we just change the string to: "Around {duration} between edits" (as opposed to: "{duration} between edits")?

@Tchanders I don't think this one is very important. Sorry, I just saw your comment. I like your suggestion about changing the wording. We could hold off on this for now though.