XML technologies / XML Schema / Data type reference / xs:gYearMonth
(Excerpt from “XML Schema” by Eric van der Vlist)
A one-month period
Derived from: xs:anySimpleType
Primitive type: xs:gYearMonth
Known subtypes: none
Facets: xs:enumeration, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:whiteSpace
Definition
<xs:simpleType name="gYearMonth" id="gYearMonth">
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace value="collapse" fixed="true"/>
</xs:restriction>
</xs:simpleType>Description
The value space of xs:gYearMonth consists of calendar-month periods, such as February 2003. The lexical space follows ISO 8601 notation for these periods, YYYY-MM, with an optional time zone.
Restrictions
The duration, one month, is fixed, and no calendars other than Gregorian are supported.
Example
Valid values include "2001-10", "2001-10+02:00", "2001-10Z", "2001-10+00:00", "-2001-10" or "-20000-04".
Invalid values would include "2001" (missing month), "2001-13" (month out of range), "2001-13-26+02:00" (month out of range) or "01-10" (missing century).
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de