Re: [whatwg] <time>

Hi David,

On Mar 13, 2009, at 4:33 AM, David Carlisle wrote:

>
> Robert J Burns wrote:
>
>> So again, if we aren't experts on calendars and date formats then we
>> also shouldn't presume we can provide the additional criteria
>> agreements to expand ISO 8601 beyond the 1582 to 9999 dates.
>
> Agreed, although I think that W3C specs should be consistent with each
> other, even if they extend ISO 8601. In this case the relevant specs  
> are
> XSD Schema, and XQuery and Xpath.

Agreed. And though XSD datatypes has not yet solve the issue, it does  
seem to be heading towards a more complete solution than that offered  
by ISO 8601 alone[1]. I have long felt that HTML5 should make more use  
of the XSD datatypes recommendation. i think even an XSD derived  
datatype could be created to indicate a calendar (and era) as well.

In any event, the XSD datatype recommendation does appear to be  
heading in the direction of solving these issues. It suggest a future  
version will solve the year zero issue by making it clear that 0000  
corresponds to 1 BC, -0001 to 2 BC and so on (as I had suggested). It  
solves the problem of years with greater than four digits by excluding  
other ISO 8601 representations that could cause ambiguity. I would  
certainly be in favor of both such moves.


> In particular XPath and Xquery say this:
>
> http://www.w3.org/TR/xpath-functions/#durations-dates-times
>
>
> For a number of the above datatypes [XML Schema Part 2: Datatypes  
> Second
> Edition] extends the basic [ISO 8601] lexical representations, such as
> YYYY-MM-DDThh:mm:ss.s for dateTime, by allowing a preceding minus  
> sign,
> more than four digits to represent the year field no maximum is
> specified and an unlimited number of digits for fractional seconds.  
> Leap
> seconds are not supported.
>
> All minimally conforming processors must support positive year
> values with a minimum of 4 digits (i.e., YYYY) and a minimum  
> fractional
> second precision of 1 millisecond or three digits (i.e.,
> s.sss). However, conforming processors may set larger
> implementation-defined limits on the maximum number of digits
> they support in these two situations. Processors may also choose
> to support the year 0000 and years with negative values. The results  
> of
> operations on dates that cross the year 0000 are
> implementation-defined.

I think XSD datatypes is a little more clear and authoritative on  
this. These XPath passages you cite appear to punt on these issues in  
much the same way that ISO 8601 does. The datatypes recommendation  
suggest that a future version will adopt a more sane approach to  
Gregorian dates of basically any length. XSD datatypes also allows for  
the representation of leap seconds (unlike the current HTML5 draft).  
All of this would be better to reference than ISO 8601 alone or the  
state of the current HTML5 draft.

Take care,
Rob

[1]: <http://www.w3.org/TR/xmlschema-2/#dateTime>
and <http://www.w3.org/TR/xmlschema-2/#isoformats>

Received on Friday, 13 March 2009 10:14:37 UTC