ISO8601DateTimeOrFloat
ISO 8601 Date Time or float argument.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | string = iso-86091 or float | The display name of the parameter type used for help text and error messages. |
Methods
convert()
@classmethod
def convert(
value: any,
param: click.Parameter,
ctx: click.Context
) - > float | datetime
Converts the input value into either a float or an ISO 8601 datetime object. This method first attempts to parse the value as a floating-point number and falls back to ISO 8601 date parsing if the numeric conversion fails.
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The raw input value to be converted into a numeric or date format. |
| param | click.Parameter | The parameter object that this value is being associated with. |
| ctx | click.Context | The current Click execution context for the command. |
Returns
| Type | Description |
|---|---|
| `float | datetime` |