I have recently started porting a code base from python 2 to 3, including dateutil. I've noticed there is a regression in behavior for some dates that are not perfectly formatted. In the examples below, it tries to parse 'Sep. 19,2013':
Python 2 Behavior
import dateutil.parser
dateutil.parser.parse('Sep. 19,2013')
> datetime.datetime(2013, 9, 19, 0, 0)
Python 3 Behavior
import dateutil.parser
dateutil.parser.parse('Sep. 19,2013')
> datetime.datetime(2020, 9, 19, 0, 0)
The Python 2 behavior appears to be more correct in this case. Is this type of imperfect date formatting supposed to be supported by dateutil? Any way to get the older behavior working in Python 3? We rely on some of this cleanup.
I have recently started porting a code base from python 2 to 3, including
dateutil. I've noticed there is a regression in behavior for some dates that are not perfectly formatted. In the examples below, it tries to parse'Sep. 19,2013':Python 2 Behavior
Python 3 Behavior
The Python 2 behavior appears to be more correct in this case. Is this type of imperfect date formatting supposed to be supported by dateutil? Any way to get the older behavior working in Python 3? We rely on some of this cleanup.