You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parsing of following date format in csv is failing 12/31/2014
This I'm guessing is due to following lines in
dateparser.py ->
defcreate_date_formats(day_first=True):
"""generate combinations of time and date formats with different delimeters """ifday_first:
date_formats= ['dd/mm/yyyy', 'dd/mm/yy', 'yyyy/mm/dd']
python_date_formats= ['%d/%m/%Y', '%d/%m/%y', '%Y/%m/%d']
else:
date_formats= ['mm/dd/yyyy', 'mm/dd/yy', 'yyyy/mm/dd']
python_date_formats= ['%m/%d/%Y', '%m/%d/%y', '%Y/%m/%d']
The day_first is always true so it never takes mm/dd/yyyy format.
Request to have a look.
Regards
The text was updated successfully, but these errors were encountered:
If there's a spreadsheet which contains strings which are unambiguously m/d/y and no/very few strings that are unambigously d/m/y, then it'd be reasonable to parse it as m/d/y by default.
(anything with a first number <13 and a second number >12/<32 is unambiguously m/d/y)
That'd mean parsing the sheet twice, though, and would lead to issues if there were only sometimes unambiguous m/d/y dates across a range of consistently m/d/y sheets.
There's also no obvious way to override messytable's behaviour; whilst I suspect something like messytables.types.DateType.formats = messytables.dateparser.create_date_formats(day_first=False) would work, it's not a nice, public, documented override; being able to configure it somewhere at a high level would make sense. Not sure where the right place would be.
The parsing of following date format in csv is failing
12/31/2014
This I'm guessing is due to following lines in
dateparser.py ->
The day_first is always true so it never takes mm/dd/yyyy format.
Request to have a look.
Regards
The text was updated successfully, but these errors were encountered: