comparison mercurial/templatefilters.py @ 8591:08c93b07f5ad

templatefilters: add filter to convert date to local date (issue1674) Issue1674 suggests the localdate filter be applied as default to log, but this patch only introduces the filter, not the changed default behaviour.
author Henrik Stuart <hg@hstuart.dk>
date Sun, 24 May 2009 11:41:07 +0200
parents beae42f3d93b
children 3d53820381cb
comparison
equal deleted inserted replaced
8590:59acb9c7d90f 8591:08c93b07f5ad
190 "hgdate": lambda x: "%d %d" % x, 190 "hgdate": lambda x: "%d %d" % x,
191 "isodate": lambda x: util.datestr(x, '%Y-%m-%d %H:%M %1%2'), 191 "isodate": lambda x: util.datestr(x, '%Y-%m-%d %H:%M %1%2'),
192 "isodatesec": lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2'), 192 "isodatesec": lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2'),
193 "json": json, 193 "json": json,
194 "jsonescape": jsonescape, 194 "jsonescape": jsonescape,
195 "localdate": lambda x: (x[0], util.makedate()[1]),
195 "nonempty": nonempty, 196 "nonempty": nonempty,
196 "obfuscate": obfuscate, 197 "obfuscate": obfuscate,
197 "permissions": permissions, 198 "permissions": permissions,
198 "person": person, 199 "person": person,
199 "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2"), 200 "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2"),