Name

xs:gYearMonth — Period of one month.

Derived from:

xs:anySimpleType

Primary:

xs:gYearMonth

Known subtypes:

none

Facets:

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

<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 is the period of one calendar month (such as the month of February 2002); its lexical space follows the ISO 8601 syntax for such periods (i.e., “YYYY-MM”) with an optional timezone.

Restrictions

The duration (one month) is fixed, and no calendars other than the Gregorian are supported.

Example

Valid values include "2001-10", "2001-10+02:00", "2001-10Z", "2001-10+00:00", "-2001-10", or "-20000-04".

The following values would be invalid: "2001" (the month part is missing), "2001-13" (the month part is out of range), "2001-13-26+02:00" (the month part is out of range), or "01-10" (the century part is missing).

Get XML Schema 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.