2018 is not last year
Categories
(bugzilla.mozilla.org :: User Interface, defect)
Tracking
()
People
(Reporter: grahamperrin, Assigned: kohei)
References
(Regression)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:56.0) Gecko/20100101 Firefox/56.0 Waterfox/56.3
Steps to reproduce:
- At (for example) https://bugzilla.mozilla.org/show_bug.cgi?id=1497581#summary-container – a bug that was opened in 2018
Actual results:
- observe the phrase "Opened last year"
- point at the phrase "last year"
- observe a date from the year before last
Expected results:
- observe the phrase "Opened two years ago"
…
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Interesting...
1481509 created on 2018-08-07 shows "Last year" for me.
1481409 created on 2018-08-07 shows "2 years ago" for me.
Assignee | ||
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
Thanks.
In bug number order, viewed here in the UK with home-built Waterfox Classic 2019.12 (20200103060435) on FreeBSD-CURRENT:
- bug 1481409 opened 2018-08-07 02:54 PDT (2 years ago) closed 2018-08-14 09:22 PDT (last year)
- bug 1481509 opened 2018-08-07 09:18 PDT (2 years ago) closed 2018-08-14 17:57 PDT (last year)
- bug 1515945 opened 2018-12-21 07:22 PST (last year)
Assignee | ||
Comment 3•6 years ago
|
||
Well, in Bug 1543881, I changed the date labels to use “last year” instead of “a year ago” but I didn’t look at the logic carefully. The commit can be easily reverted, but I think the logic itself could be simplified, maybe. And I prefer “1 year ago” than “a year ago” anyway.
if (ss < 10) return 'Just now';
if (mm < 1) return ss + ' seconds ago';
if (mm < 2) return '1 minute ago';
if (hh < 1) return mm + ' minutes ago';
if (hh < 2) return '1 hour ago';
if (dd < 1) return hh + ' hours ago';
if (dd < 2) return '1 day ago';
if (mo < 1) return dd + ' days ago';
if (mo < 2) return '1 month ago';
if (yy < 1) return mo + ' months ago';
if (yy < 2) return '1 year ago';
return yy + ' years ago';
Assignee | ||
Comment 4•6 years ago
|
||
Reporter | ||
Comment 5•6 years ago
|
||
Thank you,
(In reply to Kohei Yoshino [:kohei] from comment #3)
… I prefer “1 year ago” than “a year ago” …
Me too.
Comment 6•6 years ago
|
||
Merged to master.
Description
•