Skip to content

Parse Finnish dates with "klo" preposition #1268

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

Open
AleksMa opened this issue Apr 27, 2025 · 0 comments · May be fixed by #1269
Open

Parse Finnish dates with "klo" preposition #1268

AleksMa opened this issue Apr 27, 2025 · 0 comments · May be fixed by #1269

Comments

@AleksMa
Copy link

AleksMa commented Apr 27, 2025

dateparser cannot recognize Finnish dates with "klo" inside.

Code that reproduces the issue

import dateparser
dateparser.parse("28 maalis klo 9:37")

Expected behavior

The above code should return datetime.datetime(2025, 3, 28, 9, 37)

Observed behavior

The above code returns None.

Notice that dateparser correctly deals with forms without "klo":

>>> dateparser.parse("28 maalis 9:37")
datetime.datetime(2025, 3, 28, 9, 37)

It also works when "klo" is added to SKIP_TOKENS settings:

>>> dateparser.parse("28 maalis klo 9:37", settings={"SKIP_TOKENS":["klo"]})
datetime.datetime(2025, 3, 28, 9, 37)
AleksMa added a commit to AleksMa/dateparser that referenced this issue Apr 27, 2025
@AleksMa AleksMa linked a pull request Apr 27, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant