mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Support date format codes G, V, and u (used by ISO dates)
This commit is contained in:
parent
82098a634f
commit
09556dd880
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue