# HG changeset patch # User Ludovic Chabant # Date 1429594489 25200 # Node ID 019d274e67139b86bc5311c8ed6b07df6966d54f # Parent 28b021be74eb22355e0c043dde9dd9345eb8a305 data: Also expose XML date formatting as `xmldate` in Jinja. diff -r 28b021be74eb -r 019d274e6713 piecrust/templating/jinjaengine.py --- 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))