Converts a string having the XML Schema Duration format into a DateTime object.
Duration may be expressed using all the parts of a DateTime type (from year to fractions of a second) and are, therefore, defined as a "six-dimensional space". As the relation between some of the date parts is not fixed (such as the number of days in a month), the order relationship between durations is only partial and the result of a comparison between two durations may be undetermined.
The lexical space of xsd:duration
is the format defined by ISO 8601 under the form of PnYnMnDTnHnMnS
. The capital letters are delimiters and can be omitted when the corresponding member is not used.