Skip to content

parse parsing strings not matching date_formats #1020

Open
@haphaeu

Description

@haphaeu

Is this a bug, an undocumented feature, or maybe I didn't ready the docs thoroughly enough ?=/

In: dp.parse('Time', date_formats=['%d.%m.%Y %H:%M'])
Out: datetime.datetime(2021, 11, 19, 0, 0)

In: dp.parse('(m)', date_formats=['%d.%m.%Y %H:%M'])
Out[58]: datetime.datetime(2021, 11, 19, 0, 0)

I'd expect this to return None to be consistent when date_string doesn't match any date_formats.

In : dp.parse('something', date_formats=['%d.%m.%Y %H:%M'])
Out: None

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