-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Closed
Closed
Copy link
Labels
area:CLIkind:bugThis is a clearly a bugThis is a clearly a bugkind:documentationneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
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:
airflow/airflow-core/src/airflow/cli/cli_config.py
Lines 170 to 171 in ac085a4
| 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
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:CLIkind:bugThis is a clearly a bugThis is a clearly a bugkind:documentationneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet