provide a standard and simple way to render relative dates, in perl and javascript

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
on bmo we use both Time::Duration and TimeAgo.

to be honest i'm not happy with either of them.  timeago is too imprecise ("about a year ago", and "this evening"), and Time::Duration is too exact ("265 days ago").


i've been poking around the internets and there's ways we can make this much simpler and better.  what github does seems about right, i'll mirror them.
(Assignee)

Comment 1

3 years ago
Created attachment 8600957 [details] [diff] [review]
1158010_1.patch

- add time_ago to Bugzilla::Util
- add timeAgo to js/utils.js
- remove and replace existing calls to Time::Duration, TimeAgo, and bespoke methods
Attachment #8600957 - Flags: review?(dkl)
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1058850
Comment on attachment 8600957 [details] [diff] [review]
1158010_1.patch

Review of attachment 8600957 [details] [diff] [review]:
-----------------------------------------------------------------

Slight bit-rot. Fix on commit.

patching file extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file extensions/BugModal/template/en/default/bug_modal/header.html.tmpl.rej
Attachment #8600957 - Flags: review?(dkl) → review+
(Assignee)

Comment 4

3 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   087f740..35aab8c  master -> master
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Duplicate of this bug: 947466
You need to log in before you can comment on or make changes to this bug.