Skip to content

Commit c3824f2

Browse files
authored
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
1 parent e8626d0 commit c3824f2

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

airflow-core/src/airflow/cli/cli_config.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,24 @@ def string_lower_type(val):
167167
default=None,
168168
action="append",
169169
)
170-
ARG_START_DATE = Arg(("-s", "--start-date"), help="Override start_date YYYY-MM-DD", type=parsedate)
171-
ARG_END_DATE = Arg(("-e", "--end-date"), help="Override end_date YYYY-MM-DD", type=parsedate)
170+
ARG_START_DATE = Arg(
171+
("-s", "--start-date"),
172+
help=(
173+
"Override start_date. Accepts multiple datetime formats including: "
174+
"YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, YYYY-MM-DDTHH:MM:SS±HH:MM (ISO 8601), "
175+
"and other formats supported by pendulum.parse()"
176+
),
177+
type=parsedate,
178+
)
179+
ARG_END_DATE = Arg(
180+
("-e", "--end-date"),
181+
help=(
182+
"Override end_date. Accepts multiple datetime formats including: "
183+
"YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, YYYY-MM-DDTHH:MM:SS±HH:MM (ISO 8601), "
184+
"and other formats supported by pendulum.parse()"
185+
),
186+
type=parsedate,
187+
)
172188
ARG_OUTPUT_PATH = Arg(
173189
(
174190
"-o",

0 commit comments

Comments
 (0)