timeInterval element

The <timeInterval> element specifies the duration for the time window.

Attributes

<timeInterval> has the following attributes:

Table 1. Attributes of the <timeInterval> element
Name Description Data type Required?
duration Specifies the amount of time for the duration. The data type of this attribute is dependent on the value of the unit attribute.
  • If the value of the unit attribute is ISO-8601, the data type is xsd:duration.
  • If the value of the unit attribute is milliseconds, the data type is xsd:positiveInteger.
Yes
unit Specifies the unit of time to use. The valid values for this attribute are:
  • ISO-8601
  • milliseconds
xsd:string Yes

The use of the ISO 8601 standard for time duration

Coding ISO-8601 as the value for the unit attribute indicates that the value of the duration attribute is coded according to the ISO 8601 standard for specifying a time duration as one string. The standard XML schema data type specification uses ISO 8601 to provide a data type called duration. This data type is described in detail at http://www.w3.org/TR/xmlschema-2/#duration.

The format for the duration data type in the standard XML schema is the following string:

PnYnMnDTnHnMnS
  • P is the character that always begins the string.
  • nY represents the number of years. A year is the same as 365 days. Therefore, coding 1Y is the same as coding 365D.
  • nM represents the number of months. A month is the same as 30 days. Therefore, coding 1M is the same as coding 30D.
  • nD represents the number of days.
  • T is a separator that separates day units (years, months, and days) from time units (hours, minutes, and seconds). Time units always follow T.
  • nH represents the number of hours.
  • nM represents the number of minutes.
  • nS represents the number of seconds.
Following are examples of the format:
  • P5DT12H is 5.5 days.
  • PT59M59S is 59 minutes and 59 seconds.
  • P1M is 1 month.

Contained within

<timeInterval> is contained within the following element:

Contains

<timeInterval> contains no elements.