Skip to content

There are no exception during parse wrong year in datetime string #353

@heappro

Description

@heappro

Parser will not raise exceptions If you specify wrong year "201A".
Sample code:

from dateutil import parser

origin = "201A-01-01T23:58:39.239769+03:00"
parsed = parser.parse(origin)
print("origin={}".format(origin))
print("parsed={}".format(parsed.isoformat()))

Output:
origin=201A-01-01T23:58:39.239769+03:00
parsed=2017-03-22T23:58:39.239769+03:00

I use python3.5 on Mac.
dateutil version="2.6.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions