Name
xs:gYear
Facets
xs:enumeration ,
xs:maxExclusive , xs:maxInclusive , xs:minExclusive , xs:minInclusive , xs:pattern , xs:whiteSpace |
The xs:gYear
type stores
a year in the format CCYY
, where
CC
is the century and
YY
is the year (00–99). The overall
year must include at least four digits and may have a preceding
negative sign. Acceptable values include 1970
, -0044
, and 0801
.
A time zone relative to Coordinated Universal Time, also
known as Greenwich Time or UTC, may also be added. If there is a
time zone, the format is ±hh
:
mm
, wherein
a plus or minus sign is followed by a two-digit value for hours,
then a colon, and then a two-digit value for minutes. You can also
use Z
in place of the time
zone, indicating UTC. Valid xs:gYear
values with a time zone include
1970+05:00
, 0044-10:30
, and 0801Z
.
Get XML Pocket Reference, 3rd Edition 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.