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

word with dots breaks date parsing in french #1207

Open
JulienMaille opened this issue Jan 4, 2024 · 0 comments
Open

word with dots breaks date parsing in french #1207

JulienMaille opened this issue Jan 4, 2024 · 0 comments

Comments

@JulienMaille
Copy link

JulienMaille commented Jan 4, 2024

I'm trying to parse french text and noticed that words with dots preceding the date will break the parser

print(search_dates("TAS le 10/01", settings={'DATE_ORDER': 'DMY'}))   #[('le 10/01', datetime.datetime(2024, 1, 10, 0, 0))]
print(search_dates("T.A.S le 10/01", settings={'DATE_ORDER': 'DMY'})) #None

Changing le for on does fix it though

print(search_dates("TAS on 10/01", settings={'DATE_ORDER': 'DMY'}))   #[('on 10/01', datetime.datetime(2024, 1, 10, 0, 0))]
print(search_dates("T.A.S on 10/01", settings={'DATE_ORDER': 'DMY'})) #[('on 10/01', datetime.datetime(2024, 1, 10, 0, 0))]

Is there anything I can do with the settings to fix that?
Thanks a lot

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

1 participant