Skip to content

parse parsing strings not matching date_formats #1020

Closed

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

Activity

  1. RyanWalker277 commented on Feb 10, 2023

    @RyanWalker277

    Hey @Gallaecio ! I would like to work on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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