Project

Profile

Help

dateTime with time as 24:00:00 valid?

Added by Anonymous over 19 years ago

Legacy ID: #3024571 Legacy Poster: Jamie Martin (jameison)

should the time 24:00:00 be supported for a dateTime value (e.g. xs:dateTime(01-01-2001T24:00:00))? it causes an error to be thrown in saxon 8.1 ("Invalid dateTime value. Hour is out of range"). w3c seems to suggest it is valid assuming i am reading the following correctly: (from: http://www.w3.org/TR/xmlschema-2/#dateTime) hh is a two-digit numeral that represents the hour; '24' is permitted if the minutes and seconds represented are zero, and the dateTime value so represented is the first instant of the following day (the hour property of a dateTime object in the ·value space· cannot have a value greater than 23);


Replies (3)

Please register to reply

RE: dateTime with time as 24:00:00 valid? - Added by Anonymous over 19 years ago

Legacy ID: #3024578 Legacy Poster: Jamie Martin (jameison)

whoops, that was a bad example i gave...i meant xs:dateTime(2001-01-01T24:00:00)

RE: dateTime with time as 24:00:00 valid? - Added by Anonymous over 19 years ago

Legacy ID: #3026039 Legacy Poster: Michael Kay (mhkay)

Thanks for the comment. It's pretty clear that Saxon is out of line by not supporting 24:00:00. However, I'm not sure that the XPath specs are completely clear as to exactly how it should work, for example what hours-from-dateTime() should return. So rather than treat this as a simple bug, I'm trying to get some clarification of the spec. Michael Kay

RE: dateTime with time as 24:00:00 valid? - Added by Anonymous over 19 years ago

Legacy ID: #3028844 Legacy Poster: Jamie Martin (jameison)

thanks.

    (1-3/3)

    Please register to reply