Skip to main content

timedelta_isoformat

ISO 8601 encoding for Python timedelta object.

def timedelta_isoformat(
td: datetime.timedelta
) - > string

ISO 8601 encoding for Python timedelta object.

Parameters

NameTypeDescription
tddatetime.timedeltaThe Python timedelta object to be converted into an ISO 8601 duration string

Returns

TypeDescription
stringThe ISO 8601 formatted duration string representing the days, hours, minutes, seconds, and microseconds of the input timedelta