Skip to content

Improve --start-date / --end-date documentation to reflect actual accepted formats #59794

@roykoand

Description

@roykoand

What do you see as an issue?

The CLI help text for date arguments (e.g., --start-date/--end-date) only documents the YYYY-MM-DD format:

ARG_START_DATE = Arg(("-s", "--start-date"), help="Override start_date YYYY-MM-DD", type=parsedate)
ARG_END_DATE = Arg(("-e", "--end-date"), help="Override end_date YYYY-MM-DD", type=parsedate)

However, the actual implementation uses pendelum.parse which accepts a much wider variety of formats beyond what's documented:
return pendulum.parse(string, tz=timezone or _Timezone.initialized_timezone, strict=strict) # type: ignore

With strict=False it accepts a ton of different formats such as:

RFC 3339
2025-12-24T08:30:00Z
2025-12-24T08:30:00-05:00

ISO 8601
2025-12-24
20251224
2025-W52
08:30:00

Solving the problem

I suggest the following help text for discussion:

-s, --start-date
    Override start_date. Common formats:
      YYYY-MM-DD
      YYYY-MM-DDTHH:MM:SS
      YYYY-MM-DDTHH:MM:SS±HH:MM

    Supports any format accepted by pendulum.parse()

Additionally, I think accepting all formats supported by pendulum.parse() may not be ideal, as it could lead to ambiguity and confusion. We could consider limiting the accepted formats to a defined subset to ensure consistency and clarity.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions