Name

xsd:date — Gregorian calendar date

Synopsis

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

Derived from

xsd:anySimpleType

Primary

xsd:date

Known subtypes

None

Data parameters (facets)

enumeration, maxExclusive, maxInclusive, minExclusive, minInclusive, pattern

Description

This datatype is modeled after the calendar dates defined in Chapter 5.2.1 of ISO (International Organization for Standardization) 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 time zone. Time zones that aren’t specified are considered undetermined.

Restrictions

The basic format of ISO 8601 calendar dates, CCYYMMDD, isn’t supported.

The other forms of dates available in ISO 8601 aren’t supported: ordinal dates defined by the year, the number of the day in the year, dates identified by calendar week, and day numbers.

As the value space is defined by reference to ISO 8601, there is no support for any calendar system other than Gregorian. Because the lexical space is also defined using a 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 time zone is partial: they can be compared beyond a +/- 14 hour interval.

Get RELAX NG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.