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
This commit is contained in:
James Polley 2015-01-04 11:55:24 +00:00 committed by James E. Blair
parent c320a48c2a
commit f5aa84d896

View File

@ -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)