mercurial/templateutil.py
changeset 37227 9bcf096a2da2
parent 37226 920589f52be9
child 37231 dc4bb1422f2b
--- a/mercurial/templateutil.py	Tue Mar 20 22:57:36 2018 +0900
+++ b/mercurial/templateutil.py	Sun Mar 18 16:12:44 2018 +0900
@@ -26,6 +26,11 @@
 class TemplateNotFound(error.Abort):
     pass
 
+# stub for representing a date type; may be a real date type that can
+# provide a readable string value
+class date(object):
+    pass
+
 class hybrid(object):
     """Wrapper for list or dict to support legacy template
 
@@ -361,6 +366,7 @@
 _unwrapfuncbytype = {
     None: _unwrapvalue,
     bytes: stringify,
+    date: unwrapdate,
     int: unwrapinteger,
 }