--- a/mercurial/templatefilters.py Sat Mar 06 12:45:14 2010 +0100
+++ b/mercurial/templatefilters.py Sat Mar 06 13:29:54 2010 +0100
@@ -14,15 +14,13 @@
return "".join([stringify(t) for t in thing if t is not None])
return str(thing)
-agescales = [("second", 1),
- ("minute", 60),
- ("hour", 3600),
- ("day", 3600 * 24),
+agescales = [("year", 3600 * 24 * 365),
+ ("month", 3600 * 24 * 30),
("week", 3600 * 24 * 7),
- ("month", 3600 * 24 * 30),
- ("year", 3600 * 24 * 365)]
-
-agescales.reverse()
+ ("day", 3600 * 24),
+ ("hour", 3600),
+ ("minute", 60),
+ ("second", 1),]
def age(date):
'''turn a (timestamp, tzoff) tuple into an age string.'''