W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

Lexical representation of gMonth

From: <zongaro@ca.ibm.com>
Date: Thu, 9 Aug 2001 16:36:38 -0400
To: www-xml-schema-comments@w3.org
Message-ID: <OF4F09A9F7.6314EC6F-ON85256AA3.006ECB32@torolab.ibm.com>

     I don't know whether this has been discussed before, but I was just 
noticing what appears to be a discrepancy between the lexical 
representation of gMonth in the "XML Schema:  Datatypes" recommendation [1] and the truncated 
representation of a month described in of ISO 8601:1988.  The 
former indicates that the lexical representation is "--MM--", while the 
latter specifies the truncated representation as "--MM".

     The rule applied by ISO8601 seems (roughly) to be "omit fields on the 
right along with their separators; replace fields on the left with 
hyphens, and keep the separators."

     Was this difference intended?  If so, why wasn't the same thing done 
for gYear or gYearMonth?  They are represented in the Datatypes recommendation as "CCYY" and 
"CCYY-MM", respectively (just as in ISO 8601).  It seems that "CCYY----" 
and "CCYY-MM--" would have been more consistent with the representation 
for gMonth.

     Sorry if I'm missing either some history or the descriptions are 
different in ISO 8601:2000.



[1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#gMonth
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 778-6044;  Phone (416) 448-6044
Received on Thursday, 9 August 2001 16:36:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:53 UTC