Skip to content

New test cases that will currently fail #394

@jbrockmendel

Description

@jbrockmendel

I have a handful of cases found in the wild that are not currently supported, or in some cases give incorrect results. In each case I have a fix ready, but some of them required non-trivial refactoring. I'll make PRs for any that you want to support.

dstr = "File Creation Time: 0513201421:33"
parse(dstr, fuzzy=True)
# desired: datetime(2014, 5, 13, 21, 33)
# actual: ValueError: hour must be in 0..23

dstr = "1991041310:19:24"
parse(dstr, fuzzy=True)
# desired: datetime(1991, 4, 13, 10, 19, 24)
# actual: ValueError: hour must be in 0..23

# Infer day/year from the trailing "th"
dstr = "06 June 11th"
parse(dstr, fuzzy=True)
# desired: datetime(2006, 6, 11)
# actual: datetime.datetime(2011, 6, 6, 0, 0)

# The "94" is getting identified as a year at the beginning, then
# it balks at the "1994"
dstr = "SMITH R &  WEISS D 94 CHILD TR FBO M W SMITH UDT 12/1/1994"
parse(dstr, fuzzy=True)
# desired: datetime(1994, 12, 1)
# actual: ValueError: Unknown string format


# The 2011 is identified as the year, and so the "2012" is slotted into
# the un-filled hour/minute
dstr = "2011 MARTIN CHILDREN'S IRREVOCABLE TRUST u/a/d NOVEMBER 7, 2012"
parse(dstr, fuzzy=True)
# desired: datetime(2012, 11, 7)
# actual: datetime(2011, 11, 7, 20, 12)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions