diff mercurial/templatefilters.py @ 26127:7012be5ab5bd

templater: port localdate filter to a function It will be extended to accept a timezone argument.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 01 Sep 2015 19:15:16 +0900
parents c568c4db036f
children f580c78ea667 baa77652be68
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Tue Sep 01 19:43:14 2015 +0900
+++ b/mercurial/templatefilters.py	Tue Sep 01 19:15:16 2015 +0900
@@ -235,10 +235,6 @@
         s = s.replace(k, v)
     return ''.join(_uescape(c) for c in s)
 
-def localdate(text):
-    """:localdate: Date. Converts a date to local date."""
-    return (util.parsedate(text)[0], util.makedate()[1])
-
 def lower(text):
     """:lower: Any text. Converts the text to lowercase."""
     return encoding.lower(text)
@@ -403,7 +399,6 @@
     "isodatesec": isodatesec,
     "json": json,
     "jsonescape": jsonescape,
-    "localdate": localdate,
     "lower": lower,
     "nonempty": nonempty,
     "obfuscate": obfuscate,