[whatwg] <time>

Smylers Smylers at stripey.com
Mon Mar 16 14:03:57 PDT 2009

Tom Duhamel writes:

> It seems that pretty much everyone agrees on this:

Hi Tom.  I'd like you to clarify an aspect of your proposal:

> <time>2009-03-16</time>
> Printing directly on the page, no tool tip: "March 16, 2009"

Because the author wrote a date in ISO 8601 format, a browser should
rewrite it the user's local date format, such that it is
indistinguishable from if the author had typed it that way in the first

(Obviously pre-HTML-5 browsers will still display the raw 2009-03-16.)

Suppose I'm a UK user who happens to've configured my computer's date
format to DD/MM/YYYY (which is common over here) and I see an American
conference's website American give its date as 04/07/2009.  I know that
the USA date order is different from the UK's, so I'm used to having to
remember to read that as April 7th.  You're suggesting that there should
be two possibilities I have to take into account:

* The author literally wrote "04/07/2009", and the conference is on April

* The author literally wrote <time>2009-07-04</time>, my browser
  converted that to my local format and displayed it as 04/07/2009, and
  the conference is on July 4th

And that as a reader I can't tell which of these it is, without viewing
the document's source?  (And even to spot that there is an ambiguity
I've got to be aware that my browser 'sometimes' changes dates, that it
depends on my computer's configuration, and what config I picked.)

Does the same apply to times?  Would they also be converted to the
user's local timezone?

> <time>16 mars 2009</time>
> The user agent could, but is not required to, make an effort to
> interpret the date and do whatever it likes with it. However, if the
> date provided cannot be interpreted as ISO 8601 it could simply print
> the content as is without any change. In this example, if the user
> agent is able to understand this French date, the tool tip could be
> "March 16, 2009"

If a browser interprets a date in a different format, the localized
version goes in the tooltip but the user sees exactly what the author

That is, which version (author-written or localized) the browser shows
in the page depends on which format the author used?


More information about the whatwg mailing list