European date format parsing.

This commit is contained in:
Alen Mujezinovic 2011-06-01 14:27:08 -07:00
commit c5ffe377df

View file

@ -15,7 +15,7 @@ def get_date(string):
If no format matches the given date, raise a ValuEerror
"""
formats = ['%Y-%m-%d %H:%M', '%Y/%m/%d %H:%M', '%Y-%m-%d', '%Y/%m/%d',
'%d/%m/%Y']
'%d/%m/%Y', '%d.%m.%Y', '%d.%m.%Y %H:%M']
for date_format in formats:
try:
return datetime.strptime(string, date_format)