Page MenuHomePhabricator

Add support for "months" to Language::formatDuration
Open, Needs TriagePublic

Description

Language::formatDuration formats date intervals in seconds to human-readable strings like "5 days, 2 hours and 8 seconds".

It supports a number of time intervals like "years", "weeks", 'days" but not "months". I suspect this is complicated because months are irregular but from the user's perspective a string like "2 months and 4 days" [ago] makes perfect sense even though it can be ambiguous[1].

[1] On March 31, "1 month ago" refers to when exactly?

This change would be useful on the newcomer homepage, which is a feature to help newcomers get oriented when they first create their account, so they can figure out how to start editing quickly. In particular, in the parts of the homepage that say how the long the user has had their account, and that say how long since their mentor has been active.

Event Timeline

The Growth team is considering this task for the hackathon. We're happy to collaborate with other participants on this.

@SBisson: The Stockholm Hackathon or the Prague Hackathon? Just doublechecking.

@SBisson: The Stockholm Hackathon or the Prague Hackathon? Just doublechecking.

The Prague hackathon. I picked the wrong tag initially then I batch updated the tasks but missed this one. Thanks for catching it.

kostajh added a subscriber: kostajh.

Moving to External as it seems like this is best managed by the stewards of the MediaWiki-Internationalization board, and I don't think Growth-Team has an urgent need for this task nor time to work on it in the short-to-medium term.