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

search_date not parsing date due to certain keywords/number present in text #921

Open
dummynov1 opened this issue May 6, 2021 · 0 comments

Comments

@dummynov1
Copy link

dummynov1 commented May 6, 2021

While running the following script i don't get any date returned:

search_dates("11 sent 12-Dec-2014")
output: None

but if the first digit is any number < 9 or >12, would return the correct date "12-Dec-2014"

search_dates("09 sent 12-Dec-2014")
output: [('12-Dec-2014', datetime.datetime(2014, 12, 12, 0, 0))]

search_dates("13 sent 12-Dec-2014")
output: [('12-Dec-2014', datetime.datetime(2014, 12, 12, 0, 0))]

I have tried using "parsers = [parser for parser in default_parsers if parser != 'relative-time']" in search_date, still the same

May i know if this is a bug, or if i'm doing something wrong?

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

No branches or pull requests

2 participants