From 09556dd88062b966034927e2d6a28ae3cdaae94b Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sun, 11 Jul 2021 13:40:08 -0600 Subject: [PATCH] Support date format codes G, V, and u (used by ISO dates) --- pelican/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/utils.py b/pelican/utils.py index 8c3a886d..7b369b08 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -50,7 +50,8 @@ def strftime(date, date_format): ''' def strip_zeros(x): return x.lstrip('0') or '0' - c89_directives = 'aAbBcdfHIjmMpSUwWxXyYzZ%' + # includes ISO date parameters added by Python 3.6 + c89_directives = 'aAbBcdfGHIjmMpSUuVwWxXyYzZ%' # grab candidate format options format_options = '%[-]?.' @@ -98,7 +99,6 @@ class SafeDatetime(datetime.datetime): else: return super().strftime(fmt) - class DateFormatter: '''A date formatter object used as a jinja filter