This section describes the seven-property model used in XSD 1.1 to represent a moment of time in the Gregorian calendar system: year, month, day, hour, minute, second and timezoneOffset.
XSD 1.1 uses a date/time seven-property model
to represent a moment of time in the Gregorian calendar system.
This model is closely related to "ISO 8601 - Data elements and interchange formats" standard.
In this model, any moment of time is represented with a set of 7 values named as:
"year" - An "int" value representing Gregorian calendar year.
"month" - An "int" value between 1 and 12 inclusive representing Gregorian calendar month.
"day" - An "int" value between 1 and 31 inclusive representing Gregorian calendar day.
"hour" - An "int" value between 0 and 23 inclusive representing hour of the time
"minute" - An "int" value between 0 and 59 inclusive representing minute of the time
"second" - A "decimal" value greater than or equal to 0.0 and less than 60.0 representing
seconds and fractions of a second of the time
"timezoneOffset" - An "int" value between -840 and 840 inclusive representing timezone offset from UTC in minutes.
Each property in the seven-property model has its own lexical space:
"year" lexical space is all "year" values expressed with in -?\d\d\d\d+ pattern.
Zero padding is required to have a minimum of 4 decimal digits.
Zero padding is not allowed if there are more than 4 decimal digits.
"month" lexical space is all "month" values expressed with zero-padding in \d\d pattern.
"day" lexical space is all "day" values expressed with zero-padding in \d\d pattern.
"hour" lexical space is all "hour" values expressed with zero-padding in \d\d pattern.
"minute" lexical space is all "minute" values expressed with zero-padding in \d\d pattern.
"second" lexical space is all "second" values expressed with zero-padding in \d\d(\.\d+)? pattern.
"timezoneOffset" lexical space is all "timezoneOffset" values expressed with zero-padding
in Z|((\+|-)\d\d:\d\d) pattern. "Z" represents UTC timezone and equals to +00:00 or -00:00.
With this date/time seven-property model, the moment at midnight on 2013 new year's eve at New York city can be
represented as:
Property Value Lexical Presentation
year 2013 2013
month 1 01
day 1 01
hour 0 00
minute 0 00
second 0.0 00
timezoneOffset -300 -05:00
With this seven-property model, "dateTime" and its related built-in datatypes
can be easily described in next tutorials.