Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser displays weird behaviour on dates like "april2,2021" #1299

Open
lucasabr opened this issue Aug 2, 2023 · 1 comment
Open

Parser displays weird behaviour on dates like "april2,2021" #1299

lucasabr opened this issue Aug 2, 2023 · 1 comment

Comments

@lucasabr
Copy link

lucasabr commented Aug 2, 2023

Discovered two issues when parsing dates with the format 'MD,Y' (ex: 'january12,2001')

One of these issues is a duplicate of a currently open issue, while the other is new and could potentially negatively affect users.

  1. Throws a ParseError when the year is 3 digits

Ex/

The following does not throw an error:
parser.parse("april2,2021")
parser.parse("april2,87")

However, the following throws a ParseError:
parser.parse("april2,785")

  1. Incorrectly parses the year

This issue is a duplicate of the following: #1191

Some parse outcomes with the format specified will correctly parse the month and date, but not the year. The year will always default to the current year

Ex/

March1,3560 results in 3560-03-01 00:00:00 and is correctly parsed.

However, January15,7626 results in 2023-01-15 00:00:00 (incorrect).

@priyambajpai22
Copy link

@pganssle @lucasabr i have fixed this issue along with the test cases , please do have a look

#1302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants