XmlDuration¶
-
class
xsdata.models.datatype.
XmlDuration
(value)[source]¶ Immutable string representation for xs:duration.
- Format PnYnMnDTnHnMnS:
P: literal value that starts the expression
nY: the number of years followed by a literal Y
nM: the number of months followed by a literal M
nD: the number of days followed by a literal D
T: literal value that separates date and time parts
nH: the number of hours followed by a literal H
nM: the number of minutes followed by a literal M
nS: the number of seconds followed by a literal S
- Parameters
value (
str
) – String representation of a xs:duration, eg P2Y6M5DT12H