xs:date — Gregorian calendar date.

Derived from:




Known subtypes:



xs:enumeration, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:whiteSpace

<xs:simpleType name="date" id="date">
  <xs:restriction base="xs:anySimpleType">
    <xs:whiteSpace value="collapse" fixed="true"/>


This datatype is modeled after the calendar dates defined in Chapter 5.2.1 of ISO 8601. Its value space is the set of Gregorian calendar dates as defined by this standard; i.e., a one-day-long period of time. Its lexical space is the ISO 8601 extended format “[-]CCYY-MM-DD[Z|(+|-)hh:mm]” with an optional timezone. Timezones that are not specified are considered “undetermined.”


The basic format of ISO 8601 calendar dates “CCYYMMDD” is not supported.

The other forms of dates available in ISO 8601—ordinal dates defined by the year and the number of the day in the year and dates identified by calendar week and day numbers—are not supported.

As the value space is defined by reference to ISO 8601, there is no support for any calendar system other than Gregorian.

As the lexical space is also defined as reference to ISO 8601, there is no support for any localization such as different orders for date parts or named months.

The order relation between dates with and without timezone is partial: they can be compared only outside of a +/- 14 hours interval.

There is a dissension between ISO 8601 ...

Get XML Schema now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.