scrapinghub / scrapinghub/dateparser
German weekday "Montag" (Monday) only works with 'PREFER_DATES_FROM': 'future'?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Found this strange behaviour, German weekday "Montag" (Monday) only works with 'PREFER_DATES_FROM': 'future'.
Not sure what's going on here, all other weekdays work as expected though.
all_found_dates = dateparser.search.search_dates("Montag", languages=['de'], settings={'PREFER_DATES_FROM': 'current_period'})
print(all_found_dates)
all_found_dates = dateparser.search.search_dates("Montag", languages=['de'], settings={'PREFER_DATES_FROM': 'past'})
print(all_found_dates)
all_found_dates = dateparser.search.search_dates("Montag", languages=['de'], settings={'PREFER_DATES_FROM': 'future'})
print(all_found_dates)
Output:
[('Montag', datetime.datetime(2025, 12, 31, 0, 0))]
[('Montag', datetime.datetime(2025, 12, 31, 0, 0))]
[('Montag', datetime.datetime(2025, 4, 7, 0, 0))]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the German "Montag" case through dateparser.search.search_dates with languages=['de'] and each PREFER_DATES_FROM value. Trace how the weekday is resolved for current, past, and future settings, then add regression coverage showing consistent, correct behavior for all three settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100