Skip to content

Explicit signs lost when combining decades and years in freshness date parser #1304

@serhii73

Description

@serhii73

When both decades and years are present in the input (e.g., "-1 decade +2 years"), this logic overwrites explicit_signs["years"] with the decades flag, potentially losing whether years had an explicit sign. Consider only propagating the decades sign to years when years wasn't explicitly present, or combining them in a way that preserves an explicit sign on years if provided.

            if "decades" in explicit_signs and "years" not in explicit_signs:

Originally posted by @Copilot in #1303 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions