Re: HTML has, probably, confusing date format

At 00:41 2002-11-26 +0300, Cyril wrote:
>I am afraid that an inconvenient date format /.../ has been chosen to 
>represent dates in HTML, the format "YYYY-MM-DDThh:mm:ssTZD".

As for an entire date-time-timezone format, IIRC there's been no less than 
seven big studies of this (in the US, in Europe, in Japan, in China and 
more...) and ALL of them have reached the conclusion that the format you 
list is the format that is most logical to use. There are other ways of 
writing dates or times accordingly to ISO-8601, but those are all subsets 
of the way to represent datetimes that HTML uses.

(There was an international postal date that followed DD.MM.YYYY format, 
but as that didn't follow the logics of the format of one parameter - the 
year (a year is listed by Millenium, Century, Decade, Year, making it only 
logical to go from large to small in the other cases too.) - it was dropped 
in favor of the current IS).

Also, note that the time is 24h, not allowing am/pm. As other languages use 
other abbreviations than am and pm, and some systems use a 13/11 hour 
format instead of a 12/12 hour format for am/pm, and some use 0-11, some 
1-12, it's only logical to decide on the 24h system.

>I consider any date formats as confusing if it represents month by digits, 
>not by letters. Why not represent month by 3 letters, for example "Jan" or 
>"Sep".

This is an international standard - and because of that and the fact that 
months aren't named the same in every language in the world, the studies 
came to the conclusion that months should NOT be represented by 
language-dependent text. It also adds to the consistency that year, month 
and date are all represented by numbers.

>Sirs, if possible, let me know, is this date format is one and only legal 
>date/time strings in HTML?

The HTML 4.0 Strict DTD specify this:

   <!ENTITY % Datetime "CDATA" -- date and time information. ISO date 
format -->

Which I think would make a validator accept any CDATA string. That it 
should follow ISO-8601 is not specified in such a way that a validator 
would ever know of the requirement. I think you'll find that all 
applications using the datetime string for something only takes the full 
YYYY-MM-DDThh:mm:ssTZD format though.

// Liorean

Received on Thursday, 28 November 2002 17:56:07 UTC