diff mercurial/templatefilters.py @ 7682:9c8bbae02e9c

templater: fix age filter to state the obvious on future timestamps
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 22 Jan 2009 16:07:44 +0100
parents 0dba955c2636
children de377b1a9a84
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Thu Jan 22 15:22:37 2009 +0100
+++ b/mercurial/templatefilters.py	Thu Jan 22 16:07:44 2009 +0100
@@ -30,8 +30,10 @@
 
     now = time.time()
     then = date[0]
+    if then > now:
+        return 'in the future'
+
     delta = max(1, int(now - then))
-
     for t, s in agescales:
         n = delta / s
         if n >= 2 or s == 1: