W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Times, dates, and related topics

From: timeless <timeless@gmail.com>
Date: Thu, 19 Mar 2009 13:20:51 +0200
Message-ID: <26b395e60903190420u194840f3n325889a8eefdbe8a@mail.gmail.com>
Lachlan: please honor hixie's request not to cross post.

On Thu, Mar 19, 2009 at 12:54 PM, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> I think if we were to do this, we would have even more need to be able to
> format dates and times with CSS, especially so that authors can override the
> browser default.

suppose there was time { display:auto }

and in my browser impl of display:auto, i show a calendar icon before
the human readable localized date (or after it, whichever), and
hovering over it turns the background of the calendar orange and
paints a box around the human readable date. clicking on it shows more
information (perhaps letting the user select another locale for the
presentation, or perhaps offers to try to add it to a real calendar

currently it's possible for browsers to have <input type=button> which
has a display:auto which looks pretty (e.g. rounded and glowing blue),
but if the author adds enough style to the input, the default styling
falls off.

The same approach could be applied by browsers to <time>,  it could
fall back to the default data and only use the styling provided by the
web page.

> It's also seems like something that would be difficult to get right.
> Consider, for example, a user is reading a site in English, but their native
> language, and thus their system language, is Norwegian. ?The page says:
> <p>The event is on <time datetime="2009-03-29"></time>.</p>
> To render that in a human readable format, should the browser render "The
> event is on 29 March 2009" or "The event is on 29 Mars 2009" (where "Mars"
> is the Norwegian word for March). ?The latter would be easier to do based on
> the user's system settings. ?The former would depend on the browser knowing
> the language of the page, which is not always reliably available. ?The other
> alternative is to simply render it in a numerical only format, and the only
> unambiguous alternative is to render the ISO-8601 date as: "The event is on
> 2009-03-29".

Sadly, we already have this problem with numerals.

bidi.numeral <http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js?mark=1025-1032#1022>

The fact that we would have this problem with dates, given that the
problem already exists for numbers shouldn't be surprising.
Received on Thursday, 19 March 2009 04:20:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:48 UTC