Skip to content

Conversation

@serhii73
Copy link
Collaborator

@serhii73 serhii73 commented Jan 19, 2026

Close #1268

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (920d725) to head (939eeef).

❗ There is a different number of reports uploaded between BASE (920d725) and HEAD (939eeef). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (920d725) HEAD (939eeef)
6 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #1301       +/-   ##
==========================================
- Coverage   96.60%   0.00%   -96.61%     
==========================================
  Files         235     235               
  Lines        2889    2889               
==========================================
- Hits         2791       0     -2791     
- Misses         98    2889     +2791     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add "klo" to skip tokens in Finnish language data files
  - Modified: dateparser/data/date_translation_data/fi.py
  - Modified: dateparser_data/supplementary_language_data/date_translation_data/fi.yaml
- Add translation test case for Finnish dates with "klo"
  - Modified: tests/test_languages.py

This fixes parsing of Finnish dates like "28 maalis klo 9:37" (March 28 at 9:37).
The word "klo" (abbreviation for "kello", meaning "o'clock") is now properly
skipped during tokenization, allowing correct date parsing.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for Finnish date parsing with the word "klo" (abbreviation for "kello", meaning "clock" or "at" in time expressions). The changes add "klo" to the skip list for Finnish translation data and include comprehensive test coverage.

Changes:

  • Added "klo" to the skip list in Finnish translation data files
  • Added test cases covering various Finnish date formats with and without "klo"
  • Added translation test to verify "klo" is properly skipped during translation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_languages.py Added translation test for Finnish date with "klo" to verify it's skipped during translation
tests/test_date_parser.py Added 5 test cases covering Finnish dates with "klo" in various formats (abbreviated months, numeric dates)
dateparser_data/supplementary_language_data/date_translation_data/fi.yaml Added "klo" to the skip list for Finnish translation
dateparser/data/date_translation_data/fi.py Added "klo" to the skip list in the compiled Python translation data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@serhii73 serhii73 force-pushed the fix/finnish-klo-date-parsing branch from 939eeef to cb64f2d Compare January 21, 2026 10:32
param("fi", "su joulu 16, 2015", "sunday december 16 2015"),
param("fi", "1. tammikuuta, 2016", "1. january 2016"),
param("fi", "tiistaina, 27. lokakuuta 2015", "tuesday 27. october 2015"),
param("fi", "28 maalis klo 9:37", "28 march 9:37"),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created an issue where we can fix it - #1302

@serhii73 serhii73 merged commit f0f9102 into master Jan 23, 2026
32 checks passed
@serhii73 serhii73 deleted the fix/finnish-klo-date-parsing branch January 23, 2026 13:08
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 this pull request may close these issues.

Parse Finnish dates with "klo" preposition

4 participants