Closed Bug 1158010 Opened 10 years ago Closed 9 years ago

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

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(1 file)

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.
Attached patch 1158010_1.patchSplinter Review
- 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)
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+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git 087f740..35aab8c master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: