From 9b3e98d50308b5616061339299c176f634182fa3 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Wed, 1 Aug 2012 23:30:33 -0400 Subject: [PATCH] Use "time since" for all references to time. --- earwigbot/tasks/drn_clerkbot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/earwigbot/tasks/drn_clerkbot.py b/earwigbot/tasks/drn_clerkbot.py index c1a8444..933f7ce 100644 --- a/earwigbot/tasks/drn_clerkbot.py +++ b/earwigbot/tasks/drn_clerkbot.py @@ -706,17 +706,13 @@ class DRNClerkBot(Task): title = case["case_title"].replace("_", " ").replace("|", "|") case["title"] = title[:47] + "..." if len(title) > 50 else title - case["file_time"] = self.format_time_since(case["case_file_time"]) + case["file_time"] = self.format_time(case["case_file_time"]) case["file_sortkey"] = int(mktime(case["case_file_time"].timetuple())) case["modify_time"] = self.format_time(case["case_modify_time"]) case["modify_sortkey"] = int(mktime(case["case_modify_time"].timetuple())) row = "{{" + self.tl_chart_row + data.format(**case) + "}}\n" return row - def format_time(self, dt): - """Format a datetime into the standard MediaWiki timestamp format.""" - return dt.strftime("%H:%M, %d %b %Y") - def format_time_since(self, dt): """Return a string telling the time since datetime occured.""" parts = [("year", 31536000), ("day", 86400), ("hour", 3600)]