mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge 5fbea6202f into cfcf40f1f8
This commit is contained in:
commit
a975e2c92a
1 changed files with 2 additions and 0 deletions
|
|
@ -241,6 +241,8 @@ def get_date(string):
|
|||
|
||||
If no format matches the given date, raise a ValueError.
|
||||
"""
|
||||
if isinstance(string, datetime):
|
||||
return string
|
||||
string = re.sub(' +', ' ', string)
|
||||
default = SafeDatetime.now().replace(hour=0, minute=0,
|
||||
second=0, microsecond=0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue