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

ValueError when trying to parse an hour string following a hyphen. #256

Open
YogevHend opened this issue Apr 20, 2016 · 3 comments · May be fixed by #1315
Open

ValueError when trying to parse an hour string following a hyphen. #256

YogevHend opened this issue Apr 20, 2016 · 3 comments · May be fixed by #1315

Comments

@YogevHend
Copy link

The following line generates a ValueError:

    dateutil.parser.parse('10:00 -') # ValueError

Whereas this line is perfectly fine:

    dateutil.parser.parse('10:00')

On version 2.4.2

@pganssle pganssle added this to the 2.6.0 milestone Apr 20, 2016
@pganssle
Copy link
Member

pganssle commented Apr 20, 2016

As written, this is not a bug, since '10:00 -' is not a valid time format, so parse should fail.

That said, this also fails for some reason:

parser.parse('10:00 -', fuzzy=True)

So, I dunno what's going on there.

By the way, the latest version is 2.5.2.

@pganssle pganssle modified the milestones: Bugfix release, 2.6.0 Jul 2, 2016
@pganssle pganssle added this to Specific formats in Parser refactor and improvement Jul 21, 2017
@heydevanand
Copy link

heydevanand commented Jul 18, 2023

This also fails to be parsed: parser.parse('10:00 PM -', fuzzy=True) while this time format is absolutely correct.

@dmj111
Copy link

dmj111 commented Oct 27, 2023

Can I take this issue?

@dmj111 dmj111 linked a pull request Oct 30, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

4 participants