This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: sorting date prob
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 11 Apr 2002 09:40:06 +0100
- Subject: RE: [xsl] sorting date prob
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Yes. It is correct to be in the format yymmdd, because that
> is the ISO
> standard. And yes, everyone does not care about standards,
> but I have to.
If you care about standards then I think you need to be a little more
precise.
ISO 8601:2000 recognizes yymmdd as a "truncated representation" of a date,
and allows its use only "by mutual agreement of the partners in information
interchange". The standard defines two formats for the "complete
representation" of a "calendar date", namely the "basic format" yyyymmdd,
and the "extended format" yyyy-mm-dd. In XML documents, the extended format
is preferable, because it is the one that XML Schema has adopted. But the
basic format can be useful on occasions because it allows "<" and ">"
comparisons in XPath 1.0 expressions, treating the date as a number.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list