Skip to content

German weekday "Montag" (Monday) only works with 'PREFER_DATES_FROM': 'future'? #1262

@helfrichp

Description

@helfrichp

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))]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions