This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c3824f27001 Improve CLI date argument help text documentation (#59797)
c3824f27001 is described below
commit c3824f27001994d67bf7c4ee31ada43119ebbff0
Author: Arunodoy Banerjee <[email protected]>
AuthorDate: Fri Dec 26 05:21:58 2025 +0530
Improve CLI date argument help text documentation (#59797)
The help text for --start-date and --end-date arguments only
documented the YYYY-MM-DD format, but the actual implementation
uses pendulum.parse() which accepts a much wider variety of formats.
This commit updates the help text to accurately document the
commonly used formats:
- YYYY-MM-DD (date only)
- YYYY-MM-DDTHH:MM:SS (datetime)
- YYYY-MM-DDTHH:MM:SSHH:MM (datetime with timezone, ISO 8601)
The help text also references pendulum.parse() to indicate that
additional formats are supported, improving clarity for users.
Fixes: Incomplete documentation of date format options
---
airflow-core/src/airflow/cli/cli_config.py | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/cli/cli_config.py
b/airflow-core/src/airflow/cli/cli_config.py
index 80e00a38423..973d6ba0db6 100644
--- a/airflow-core/src/airflow/cli/cli_config.py
+++ b/airflow-core/src/airflow/cli/cli_config.py
@@ -167,8 +167,24 @@ ARG_BUNDLE_NAME = Arg(
default=None,
action="append",
)
-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)
+ARG_START_DATE = Arg(
+ ("-s", "--start-date"),
+ help=(
+ "Override start_date. Accepts multiple datetime formats including: "
+ "YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, YYYY-MM-DDTHH:MM:SS±HH:MM (ISO
8601), "
+ "and other formats supported by pendulum.parse()"
+ ),
+ type=parsedate,
+)
+ARG_END_DATE = Arg(
+ ("-e", "--end-date"),
+ help=(
+ "Override end_date. Accepts multiple datetime formats including: "
+ "YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, YYYY-MM-DDTHH:MM:SS±HH:MM (ISO
8601), "
+ "and other formats supported by pendulum.parse()"
+ ),
+ type=parsedate,
+)
ARG_OUTPUT_PATH = Arg(
(
"-o",