Re: Date Fields in HTML

Hi,

Thank you for your comments.  I agree that the tags would definately have to
specify the type of date contained in the date field.  That was kind of what
I was trying to acheive by the format="us" or format="uk" attribute, but
this is my first attempt at documenting an idea for the W3C so I'm sure I
didn't express it properly!

I was thinking along the lines of:

<date format="us">05/07/03</date> - which the browser would
interpret as 7th of May 2003, or:

<date format="uk">05/07/03</date> - which the browser would
interpret as 5th of July 2003.

<date format="zh">05/07/03</date> - which the browser would
interpret as 3rd of July 2005 (Chinese format)

You could also have types for Julian dates, or even things like Japanese
Imperial Dates, but then you'd think that if the programmer had a reason for
using these dates in his web-page, then they may want to display them as
they were originally written...!

One problem I could also forsee with dates outside of the ordinary
dd/mm/yyyy variant (such as Japanese Imperial Dates or even western long
dates) would be that there is no exact way of writing them, compare:

25th of July 2003
25 July, 2003
25th-July-2003

In which case it may be possible to add a "display" attribute (or such like_
that would tell the browser how to display the date, eg:

<date format="us" display="long">05/06/03</date> may display
"5th June 2003" to a British user and "June 5th 2003" to an American user,
while:

<date format="us" display="short">05/06/03</date> may display
"06/05/03" to a British user and "05/06/03" to an American user.

Kind Regards,

James Brown.

----- Original Message ----- 
From: "Arthur Wiebe" <webmaster@awiebe.com>
To: "James Brown" <james@dreambreed.com>; <www-html@w3.org>
Sent: Monday, June 02, 2003 10:17 PM
Subject: Re: Date Fields in HTML


> That's a good idea but there is a problem. The user agent would have to
> understand the date format the it's converting from and it has no way of
> telling whether or not 1/12/04 is supposed to be January 12, 2004 or
> December 1, 2004 or even some other date. Then you must also define what
> form to write the date in inside the date element.
> In the spec it could say exactly how to write the date so the user agent
> knows how to convert it.
> <Arthur/>
>
> James Brown wrote:
>
> >Would it not be useful for XHTML and HTML to include a date tag along the
> >lines of:
> >
> >    &gt;date format="us"&lt;
> >
> >or:
> >
> >    &gt;date format="uk"&lt;
> >
> >to mark dates.  Enabled browsers could then convert the date to the
> >preferred local format (as defined by the user's operating system).  This
> >would prevent user error with unclear dates such as 04/06/03 or
07/04/2003,
> >and would make reading foreign pages much easier.
> >
> >Regards,
> >
> >James Brown
> >DreamBreed.com
> >
> >
> >
> >
>
>
>

Received on Monday, 2 June 2003 18:11:20 UTC