The primitive type xs:gMonth
represents a recurring month. It can be used to specify, for example, that year-end auditing occurs in October of every year. It does not represent a number of months; to represent that, use the xs:yearMonthDuration
type instead.
The lexical representation of xs:gMonth
is --MM
. An optional time zone may be used, as described in "Time Zones" in Chapter 19. Table B-12 lists some values of this type.
Table B-12. Values of the xs:gMonth type
Values of xs:gMonth
can be tested for equality (or inequality) with other values of the same type, but you cannot compare them 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:gMonth
returns an xs:gMonth
value of --05
. They can also be cast to and from xs:string
and xs:untypedAtomic
.
18.191.62.122