[whatwg] simple numbers

On Tue, 11 Dec 2007, Fabien Meghazi wrote:
> >
> > While I think there is certainly something to be said for the 
> > proposal, I don't think there is enough evidence that authors really 
> > want or need this. I think we should focus on having CSS support this 
> > first.
> 
> Maybe we could think about a general purpose element which allows 
> formating for regionalisation of values.
> 
> Example for datetimes. Consider an application where you have the 
> timezone of your users, you have to pan the date accordingly to the 
> timezone of the user, and you have to do this server side. Besides, if 
> it's a public site and you don't have timezones of your users, you will 
> only display a datetime that will match the server's system date. If we 
> could have a tag that takes a UTC/GMT and format it accordingly to 
> client system dates and his system/browser preference ( dd/mm/yyyy, 
> yy/mm/dd, mm/dd/yyyy, ....) we would get rid of a problem all web 
> developpers came across.
> 
> I think that it would be a good thing to have a data regionalisation tag 
> that would allow to display dates, datetimes, numbers, currencies, ...
> 
> <tag type="datetime">Tue, 11 Dec 2007 10:57:14 GMT</tag>
> 
> format could be overridden
> 
> <tag type="datetime" format="yyyy/mm/dd HH:MM">Tue, 11 Dec 2007 10:57:14 
> GMT</tag>
> 
> <tag type="number">251234565455.26</tag>
> 
> or even a styles like declaration ?
> 
> <tag format="type: currency; decimals: 2">251234565455.2654656</tag> $
> 
> 
> Anyway, I think it's worth discussing about this because it would be a 
> good think for usability of browsers. If this is implemented, we will 
> see a cool extension for Firefox 7.0 that will allows to convert foreign 
> currencies on the fly on websites.

On Tue, 11 Dec 2007, Fabien Meghazi wrote:
>
> Anyway, for backward compatibility sake, I would say that we need a 
> format human readable, and the T & Z letters make it hard to read, so I 
> think it would be better to get rid of them like this :
> 
> <tag type="date">2007-12-11 10:57:14</tag>
> 
> Would render 2007-12-11 10:57:14 if tag is not supported
> 
> If tag is supported, the formating will occur according to the system 
> localization.

On Tue, 11 Dec 2007, Christoph P?per wrote:
> 
> JFTR: <http://www.mediawiki.org/wiki/Extension:UnitsFormatter>
> 
> Its scope is a little different (and it should probably comply to the 
> Unified Code for Units of Measure 
> <http://aurora.regenstrief.org/UCUM/ucum.html>), but it's one little 
> proof at least that the idea itself is not just esoteric or academic.
> 
> > I think we should focus on having CSS support this first.
> 
> I consider localised numbers (and dates) inside non-localised text 
> harmful, but this markup / metadata is useful for extraction (of several 
> kinds).

On Tue, 11 Dec 2007, Philipp Kempgen wrote:
> 
> But the localized version could be displayed in a tooltip or something, 
> depending on the browser / settings of the user.

The above discussions didn't really add anything new to the discussion. 
Thus, my earlier conclusion stands: while I think there is certainly 
something to be said for a way to encode numbers unambiguously (e.g. 
through <number>4</number>), I don't think there is enough evidence that 
authors really want or need this. I think we should focus on having CSS 
support this first.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 6 May 2008 18:12:53 UTC