From f5aa84d8961d420eccd5848340c68a118de76b60 Mon Sep 17 00:00:00 2001 From: James Polley Date: Sun, 4 Jan 2015 11:55:24 +0000 Subject: [PATCH] Always display full date It's January 4. Just because a change was updated 5 days ago is no reason to be merely telling me it was updated in '2014' - that makes it impossible for me to tell the difference between a 5-day-old change and a 369-day-old change. (if I'd gotten around to fixing this on Jan 1 when it first bugged me, I would have been talking about changes that were mere second old being lumped in with changes almost a year old) For changes performed today, the Updated column will show the time of day. For older changes, this change changes the date presentation for all dates in the Updated column to be ISO-8601 date format, following the recommendations in that most canonical of sources, http://xkcd.com/1179/ Change-Id: I4702ff5f226a3eb0cdeb258856686e6e0eaef41d --- gertty/view/change_list.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gertty/view/change_list.py b/gertty/view/change_list.py index 2ba7a04..8b307d0 100644 --- a/gertty/view/change_list.py +++ b/gertty/view/change_list.py @@ -97,10 +97,8 @@ class ChangeRow(urwid.Button): self.owner.set_text(change.owner_name) if datetime.date.today() == change.updated.date(): self.updated.set_text(change.updated.strftime("%I:%M %p").upper()) - elif datetime.date.today().year == change.updated.date().year: - self.updated.set_text(change.updated.strftime("%b %d")) else: - self.updated.set_text(change.updated.strftime("%Y")) + self.updated.set_text(change.updated.strftime("%Y-%m-%d")) del self.columns.contents[self.num_columns:] for category in categories: v = change.getMaxForCategory(category)