[whatwg] [Web Forms 2.0] Last minute suggestion - The <format> element.

Jonas Sicking jonas at sicking.cc
Fri Jan 21 13:11:59 PST 2005


Matthew Raymond wrote:
 > The one thing that still concerns me about my <format> suggestion is
 > how browsers should parse the contents of a <format> element. We don't
 > want different browsers processing the string differently, yielding
 > browser-dependent date/time formats. Any suggestions?

I think it will be very difficult to have browsers parse it. First off, 
authors probably want to put much more then the actual format in there, 
like a text like: "Please write year followed by month followed by day, 
for example  may first 2004 is written as 20040501". I.e. they some 
descriptionary text that might not include the format in a parseable way 
at all.

Second, you might WF2 enabled UAs to display the date in a different 
format from what non-WF2 UAs should use. For example you might want to 
display the weekday, but not force people to manually figure out the 
weekday and type it in. It is probably pretty common to want to have a 
shorter format manually typed to reduce the amount of errors, but want 
WF2 UAs to display an elaborate string since that's easier to read.

That said, I do think a simple <format> element would be usefull which 
WF2 UAs would ignore and not display.

Best Regards,
Jonas Sicking



More information about the whatwg mailing list