Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templatefilters.py @ 9722:4d9dea174b84
templater: readable dates older than 24 months revert to ISO8601 (issue1006)
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 05 Nov 2009 15:19:54 +0100 |
parents | 1d75c683ada1 |
children | 25e572394f5c |
line wrap: on
line diff
--- a/mercurial/templatefilters.py Thu Nov 05 14:44:29 2009 +0100 +++ b/mercurial/templatefilters.py Thu Nov 05 15:19:54 2009 +0100 @@ -40,6 +40,9 @@ return 'in the future' delta = max(1, int(now - then)) + if delta > agescales[0][1] * 2: + return util.shortdate(date) + for t, s in agescales: n = delta // s if n >= 2 or s == 1: