Support date format codes G, V, and u (used by ISO dates)

This commit is contained in:
MinchinWeb 2021-07-11 13:40:08 -06:00
commit 09556dd880

View file

@ -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