Re: env(date), env(time), env(date-time)

Personal response:

It occurs to me that this might actually be a relevant property for 
"date" and "datetime" input fields in HTML5 too.

Sometimes input fields would logically operate in the timezone of the 
user and in others some other timezone (e.g. for a flight booking).

On 25/05/2010 19:42, Håkon Wium Lie wrote:
> Hello i18n-core,
>
> Some browsers offer to print the URL, the date, or the time when
> printing web content. To make this feature more configurable -- both
> for browser vendors, for authors, and for users -- there is a proposal
> in CSS3 to format these according to the environment/locale of the
> formatter [1]. For example, consider this snippet:
>
>    @page {
>      @top-right { content: env(date) }
>      @bottom-right { content: env(time) }
>    }
>
> The resulting printout (or PDF file, perhaps) would show the date in
> the upper right corner, and the time in the lower right corner
> according the the environment/locale of the formatter. To support this
> feature, UAs would need to fetch the date/time/date-time of the local
> system. This seems quite doable and the current draft states in a note:
>
>    On many systems, preformatted strings in the user's locale can be
>    found through the strftime [2] function. The date, time and date-time
>    strings can be found by using the "%x", "%X" and "%c" conversion
>    strings, respectively.
>
> I'm running the text by this group to see if it is (a) correct, or (b)
> can be improved.
>
> The proposal is kept simple on purpose. As such, it allows style
> sheets to refer to the locale of the formatter, but not to other
> locales.
>
> [1] http://dev.w3.org/csswg/css3-gcpm/#string-set
> [2] http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html
>
> Cheers,
>
> -h&kon
>                Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome
>    
-----
David Clarke

Received on Wednesday, 26 May 2010 14:52:12 UTC