Mercurial > kallithea
diff rhodecode/lib/helpers.py @ 2416:44f328d6f209 beta
Added a translatable date formatter for every date displayed.
author | Vincent Duvert <vincent@duvert.net> |
---|---|
date | Tue, 05 Jun 2012 00:17:28 +0200 |
parents | 679363531571 |
children | f467c75544af |
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py Mon May 28 21:56:56 2012 +0200 +++ b/rhodecode/lib/helpers.py Tue Jun 05 00:17:28 2012 +0200 @@ -345,6 +345,14 @@ hide_credentials = lambda x: ''.join(credentials_filter(x)) +def fmt_date(date): + if date: + return (date.strftime(_(u"%a, %d %b %Y %H:%M:%S").encode('utf8')) + .decode('utf8')) + + return "" + + def is_git(repository): if hasattr(repository, 'alias'): _type = repository.alias