The primitive type xs:gYearMonth
represents a specific month. The lexical representation of xs:gYearMonth
is YYYY-MM
. A preceding minus sign (−) can be used to represent years before 0001. An optional time zone may be used, as described in "Time Zones" in Chapter 19. Table B-15 lists some values of the xs:gYearMonth
type.
Values of xs:gYearMonth
can be tested for equality (or inequality) with other values of the same type, but they cannot be compared using the operators <
, <=
, >
, or >=
.
Values of this type can be cast from the xs:date
and xs:dateTime
types. For example, the expression xs:date("2006-05-30") cast as xs:gYearMonth
returns an xs:gYearMonth
value of 2006-05
. They can also be cast to and from xs:string
and xs:untypedAtomic
.
18.226.164.75