Mercurial > piecrust2
changeset 356:019d274e6713
data: Also expose XML date formatting as `xmldate` in Jinja.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 20 Apr 2015 22:34:49 -0700 |
parents | 28b021be74eb |
children | 3a496ffbb898 |
files | piecrust/templating/jinjaengine.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/templating/jinjaengine.py Mon Apr 20 22:34:15 2015 -0700 +++ b/piecrust/templating/jinjaengine.py Mon Apr 20 22:34:49 2015 -0700 @@ -149,7 +149,8 @@ 'stripoutertag': strip_outer_tag, 'stripslash': strip_slash, 'titlecase': title_case, - 'atomdate': get_atom_date, + 'atomdate': get_xml_date, + 'xmldate': get_xml_date, 'emaildate': get_email_date, 'date': get_date}) @@ -237,7 +238,7 @@ return value.title() -def get_atom_date(value): +def get_xml_date(value): return strict_rfc3339.timestamp_to_rfc3339_localoffset(int(value))