equal
deleted
inserted
replaced
48 templatefunc = registrar.templatefunc(funcs) |
48 templatefunc = registrar.templatefunc(funcs) |
49 |
49 |
50 |
50 |
51 @templatefunc(b'date(date[, fmt])') |
51 @templatefunc(b'date(date[, fmt])') |
52 def date(context, mapping, args): |
52 def date(context, mapping, args): |
53 """Format a date. See :hg:`help dates` for formatting |
53 """Format a date. The format string uses the Python strftime format. |
54 strings. The default is a Unix date format, including the timezone: |
54 The default is a Unix date format, including the timezone: |
55 "Mon Sep 04 15:13:13 2006 0700".""" |
55 "Mon Sep 04 15:13:13 2006 0700".""" |
56 if not (1 <= len(args) <= 2): |
56 if not (1 <= len(args) <= 2): |
57 # i18n: "date" is a keyword |
57 # i18n: "date" is a keyword |
58 raise error.ParseError(_(b"date expects one or two arguments")) |
58 raise error.ParseError(_(b"date expects one or two arguments")) |
59 |
59 |