Re: [xsl] Is xs:date('2012-09-10+14:00') less than xs:date('2012-09-11-14:00') ?

Subject: Re: [xsl] Is xs:date('2012-09-10+14:00') less than xs:date('2012-09-11-14:00') ?
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Tue, 18 Sep 2012 08:38:23 +0200
On 17/09/2012, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> At 2012-09-17 20:01 +0000, Costello, Roger L. wrote:
>>
>>       xs:date('2012-09-10+14:00') lt xs:date('2012-09-11-14:00')
>>
>>September 10, 2012 plus 14 hours is less than September 11, 2012
>>minus 14 hours?
>>
>>As I calculate it,
>>
>>       September 10, 2012 plus 14 hours is 2:00 PM on September 10, 2012
>>
>>and
>>
>>      September 11, 2012 minus 14 hours is 10:00 AM on September 10, 2012
>>
>>No?
>
> No, not at all.  Your mistake is that it isn't a calculation.

Well, it is, in a way, but the time zone offset must be *subtracted*
in order to arrive at comparable values.

>
> The +14:00 is not a time delta, it is an indication of where in the
> world the date you have is found.  And I'm not sure +/- 14:00 is
> allowed ... I think time zones only go up to +/-13:00.  Ah, I'm
> wrong, there is a +14:00, and there is a -12:00, but nothing beyond:
>
>    http://en.wikipedia.org/wiki/UTC%2B14:00
>    http://en.wikipedia.org/wiki/UTC-12:00
>

XML Schema Part  2 permits +/- 14:00, noting that "future local laws"
might make use of this full range.

-W

Current Thread