mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Deleted commented code. Refs #962.
This commit is contained in:
parent
1538aea54f
commit
baba75cad5
1 changed files with 0 additions and 34 deletions
|
|
@ -180,40 +180,6 @@ def get_date(string):
|
|||
|
||||
If no format matches the given date, raise a ValueError.
|
||||
"""
|
||||
#string = re.sub(' +', ' ', string)
|
||||
#formats = [
|
||||
# # ISO 8601
|
||||
# '%Y',
|
||||
# '%Y-%m',
|
||||
# '%Y-%m-%d',
|
||||
# '%Y-%m-%dT%H:%M%z',
|
||||
# '%Y-%m-%dT%H:%MZ',
|
||||
# '%Y-%m-%dT%H:%M',
|
||||
# '%Y-%m-%dT%H:%M:%S%z',
|
||||
# '%Y-%m-%dT%H:%M:%SZ',
|
||||
# '%Y-%m-%dT%H:%M:%S',
|
||||
# '%Y-%m-%dT%H:%M:%S.%f%z',
|
||||
# '%Y-%m-%dT%H:%M:%S.%fZ',
|
||||
# '%Y-%m-%dT%H:%M:%S.%f',
|
||||
# # end ISO 8601 forms
|
||||
# '%Y-%m-%d %H:%M',
|
||||
# '%Y-%m-%d %H:%M:%S',
|
||||
# '%Y/%m/%d %H:%M',
|
||||
# '%Y/%m/%d',
|
||||
# '%d-%m-%Y',
|
||||
# '%d.%m.%Y %H:%M',
|
||||
# '%d.%m.%Y',
|
||||
# '%d/%m/%Y',
|
||||
# ]
|
||||
#for date_format in formats:
|
||||
# try:
|
||||
# date = datetime.strptime(string, date_format)
|
||||
# except ValueError:
|
||||
# continue
|
||||
# if date_format.endswith('Z'):
|
||||
# date = date.replace(tzinfo=pytz.timezone('UTC'))
|
||||
# return date
|
||||
#raise ValueError('{0!r} is not a valid date'.format(string))
|
||||
try:
|
||||
return parser.parse(string)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue