Skip to content

[BUG] fd should print more specific error messages for --changed- date parsing #2053

Description

@5HT2

Checks

  • I have read the troubleshooting section and still think this is a bug.

Describe the bug you encountered:

This, is rather unintuitive:

fd -u --changed-before=2025-11-31                                                                                                                                                     1:02:18
[fd error]: '2025-11-31' is not a valid date or duration. See 'fd --help'.

If fd fails to parse the date, it should unwrap the inner error message and actually tell the user why this is not a valid date according to fd.

Describe what you expected to happen:

The fact that it might not be a valid day on that calendar year should be presented to the user. The natural inclination is to assume it's a formatting issue.

What version of fd are you using?

#fb1486f

Which operating system / distribution are you on?

Darwin 23.6.0 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions