Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1052 closed enhancement (fixed)

[patch] Add a 'weeks' fidelity for timesince/timeuntil

Reported by: freakboy@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: trivial Keywords: utils timesince
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

timesince() / timeuntil() evaluate the difference between two dates and return an approximate answer in days, months, and years.

This patch adds a 'weeks' fidelity to the description.

For example:

>> timesince(datetime(2005,12,3), datetime(2005,12,13))
OLD: '16 days'
NEW: '2 weeks, 2 days'

>> timesince(datetime(2005,11,27), datetime(2005,12,13))
OLD: '10 days, 4 hours'
NEW: '1 week, 3 days'

In addition to applying this patch, translations need to be regenerated and updated for the 'week'/'weeks' keywords.

Attachments (1)

timesince_weeks.diff (609 bytes ) - added by freakboy@… 19 years ago.
Patch to add 'weeks' fidelity to timesince/timeuntil

Download all attachments as: .zip

Change History (3)

by freakboy@…, 19 years ago

Attachment: timesince_weeks.diff added

Patch to add 'weeks' fidelity to timesince/timeuntil

comment:1 by anonymous, 19 years ago

Severity: normaltrivial

comment:2 by Russell Keith-Magee, 19 years ago

Resolution: fixed
Status: newclosed

(In [1862]) magic-removal: Fixes #1052 -- Added a 'weeks' fidelity to strings returned by timesince()/timeutil().

Note: See TracTickets for help on using tickets.
Back to Top