XML Tutorial/XML Schema/duration
The duration datatype represents a duration
<!-- schema -->
<xsd:element name="vacation">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:pattern value="P\d+D\d+H\d+M\d+S"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- instance document -->
<vacation>P10D2H30M45S</vacation>