Skip to content

Make the time a little friendlier.

Pete requested to merge p/pleroma-fe:fix/time-units into develop

This commit changes the threshold for displaying the time difference on posts. At present, it is triple, so a post eight days old shows as '8d' rather than '1w', and a post nineteen days old shows as '19d' rather than '2w'. It's set up the same for each step up in units, so you see '46h' rather than '1d', '14mo' or '19mo' rather than '1y', etc.

We've been using this on FSE for maybe six months (although I was just editing the minified code; this made updates a pain), and people seem to like it (if they notice it).

The factor 3 was chosen arbitrarily and the change to the code is minimal. It might make more sense to use a different factor for different units ("135 minutes" is less natural than "2 hours"). Happy to tweak that if so; I have another patch that does this, although I have not tested it.

Merge request reports

Loading