Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1052 closed enhancement (fixed)

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

Reported by: freakboy@… Owned by: adrian
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: UI/UX:

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@… 8 years ago.
Patch to add 'weeks' fidelity to timesince/timeuntil

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by freakboy@…

Patch to add 'weeks' fidelity to timesince/timeuntil

comment:1 Changed 8 years ago by anonymous

  • Severity changed from normal to trivial

comment:2 Changed 8 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.