Skip to content

Regression Moving from Python 2 to Python 3 #1075

@speedplane

Description

@speedplane

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions