Routing API Developer's Guide

xs:duration

The lexical representation for duration is the ISO 8601 extended format:

"-"? + "P" + (nY + "Y")?
 + (nM + "M" )? + (nD + "D" )?
 + ("T" (nH + "H")?
 + (nM + "M")? + (nS + "S")?)?
Syntax Description
"-" Optional minus sign to represent negative durations. If the sign is omitted a positive duration is indicated.
nY represents the number of years. Must be an unsigned integer.
nM represents the number of months. Must be an unsigned integer.
nD represents the number of days. Must be an unsigned integer.
nH represents the number of hours. Must be an unsigned integer.
nM represents the number of minutes. Must be an unsigned integer.
nS represents the number of seconds, which can include decimal digits represent fractions of seconds.

Duration Example

P1Y2M3DT10H30M indicates a duration of 1 year, 2 months, 3 days, 10 hours, and 30 minutes.

-P120D indicates a duration of minus 120 days.