Edgewall Software
Modify

Opened 15 years ago

Last modified 9 years ago

#8480 new enhancement

[patch] Add relative date info to timeline

Reported by: sebastian@… Owned by:
Priority: low Milestone: unscheduled
Component: timeline Version: 0.11.4
Severity: normal Keywords: patch
Cc: lists@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently when viewing the timeline the group headers only display a relative date info for "today" or "yesterday". The patch I've attached to this ticket also adds a relative date info in all other cases; it uses dateinfo() to create this info (see screenshot).

There may be a better solution (I'm not that familiar with Python) but this patch changes as few lines of code as possible.

Attachments (3)

relative-dateinfo-timeline.patch (898 bytes ) - added by sebastian@… 15 years ago.
Patch against Trac 0.11.4
timeline.png (31.1 KB ) - added by sebastian@… 15 years ago.
Screenshot of the patch's effect
004_relative-dateinfo-timeline.patch (977 bytes ) - added by Sebastian Krysmanski <sebastian@…> 15 years ago.
Patch using "replace" rather than "combine"

Download all attachments as: .zip

Change History (11)

by sebastian@…, 15 years ago

Patch against Trac 0.11.4

by sebastian@…, 15 years ago

Attachment: timeline.png added

Screenshot of the patch's effect

comment:1 by Sebastian Krysmanski <sebastian@…>, 15 years ago

I think datetime.replace is better than datetime.combine in this case. I've added a new patch that uses replace rather than combine.

by Sebastian Krysmanski <sebastian@…>, 15 years ago

Patch using "replace" rather than "combine"

comment:2 by Christian Boos, 15 years ago

The patch should be refreshed to take localization into account.

comment:3 by Christian Boos, 15 years ago

Milestone: 0.12next-minor-0.12.x
Owner: set to Sebastian Krysmanski <sebastian@…>

comment:4 by Christian Boos, 15 years ago

… unless an updated patch is coming soon ;-)

comment:5 by Christian Boos, 14 years ago

Milestone: next-minor-0.12.xunscheduled

And also, this should be made smarter: when all relative dates end up being the same, this feature would be more annoying than useful (imagine seeing "Two months ago" for every day shown).

comment:6 by Thijs Triemstra <lists@…>, 14 years ago

Cc: lists@… added

comment:7 by Ryan J Ollos, 9 years ago

Owner: Sebastian Krysmanski <sebastian@…> removed

comment:8 by figaro, 9 years ago

Keywords: patch added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.