Skip to content

Bug #278: Incorrect fuzzy date parsing.#279

Closed
shmuga wants to merge 1 commit into
dateutil:masterfrom
shmuga:fuzzy-parser-bug-dd.mm
Closed

Bug #278: Incorrect fuzzy date parsing.#279
shmuga wants to merge 1 commit into
dateutil:masterfrom
shmuga:fuzzy-parser-bug-dd.mm

Conversation

@shmuga

@shmuga shmuga commented Jul 20, 2016

Copy link
Copy Markdown

Bug related to #278.

  • Added test case to bug.
  • Fix bug when first part of ymd object is larger than 12 and length of ymd array == 2 - it's exactly date not month.
  • Added rule for case when date in format "DD.MM" or "MM.DD"

* Added test case to bug.
* Fix bug when first part of ymd object is larger than 12 and length of ymd array == 2 - it's exactly date not month.
* Added rule for case when date in format "DD.MM" or "MM.DD"
def testFuzzyWithDotNotation(self):
s1 = "27.08"
today_year = date.today().year
self.assertEqual(parse(s1, fuzzy=True), datetime(today_year, 8, 27, 0, 0))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed in the following ways:

  1. Just pass a specific date to default so you don't have to worry about retrieving the current year
  2. Remove the fuzzy keyword. It is unnecessary.

@pganssle

Copy link
Copy Markdown
Member

Doesn't seem like this is still being worked on, closing this.

@pganssle pganssle closed this Apr 24, 2018
@pganssle pganssle added this to the wontfix milestone Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants