Skip to main content

ISO8601DateTime

ISO 8601 Date Time argument.

Attributes​

AttributeTypeDescription
namestring = iso-86091The internal identifier for the parameter type used by the Click library to represent ISO 8601 date-time arguments.

Methods​


convert()​

@classmethod
def convert(
value: string,
param: click.Parameter,
ctx: click.Context
) - > datetime

Parses a string value into a datetime object if it matches the ISO 8601 format, otherwise raises a validation error.

Parameters​

NameTypeDescription
valuestringThe raw input string to be converted into a datetime object.
paramclick.ParameterThe parameter object that this value is being associated with.
ctxclick.ContextThe current Click execution context for the command line interface.

Returns​

TypeDescription
datetimeA datetime object representing the parsed input value.