Name
xs:date
Facets
xs:enumeration ,
xs:maxExclusive , xs:maxInclusive , xs:minExclusive , xs:minInclusive , xs:pattern , xs:whiteSpace |
The xs:date
type stores
individual Gregorian calendar dates in the format
CCYY
-
MM
-
DD
, where
CC
is two or more digits for the
century, YY
is the year (00–99),
MM
is the month (01–12), and
DD
is the day (01–31). For years before
1, a negative sign may appear before the century. Acceptable dates
include 1999-11-25
, -0044-03-15
, and 2020-01-01
.
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 dates with a time zone include
1999-11-25+05:00
, -0044-03-15-10:30
, and 2020-01-01Z
.
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.