[whatwg] time and meter elements

Ian Hickson ian at hixie.ch
Tue Dec 11 02:03:17 PST 2007


On Thu, 8 Feb 2007, David Latapie wrote:
> 
> I have some trouble inderstanding the need for these elements really. 
> Especially when considering the example:
> 
> <http://www.whatwg.org/specs/web-apps/current-work/#the-time>
> <p>Our first date was <time datetime="2006-09-23">a saturday</time>.</p>
> Out of sorting all the events that happened that day, it really seems 
> weird to me.

Yeah, the example isn't compelling. But there has been a lot of demand for 
a <time> element, most notoriously from the microformats community who are 
current abusing <abbr> in lieu of having <time>.


On Tue, 13 Feb 2007, Matthew Raymond wrote:
>
> A <name> element may have some uses, such as providing a hook for adding 
> people to your contact list:
> 
> | <address>
> |   <name>John Hopkins</name><br>
> |   Phone: (359) 555-1701
> | </address>

Notwithstanding what I consider misuse of <br> in that example, I would 
encourage people to use hCard to mark up a name instead of us introducing 
an element for the purpose.


> One rationale is localization. The browser can take the time given by 
> the |datetime| attribute and convert it into a localized time. For 
> instance, what does this mean?...
> 
> | <p>We're changing the day of the meeting to 08-03-07.</p>
> 
> Is the date August 3rd, 2007, March 8th, 2007 or March 7th, 2008? 
> Now, look at this:
> 
> | <p>
> |   We're changing the day of the Inkwells meeting to
> |   <time datetime="2007-08-03">08-03-07</time>.
> | </p>
> 
> The user agent can replace the contents of <time> with the localized 
> value of |datetime|, with the added plus of having a hook for styling.

Indeed.


On Wed, 14 Feb 2007, Matthew Raymond wrote:
> > 
> > I see where you are going. So, a <name> element would make sense 
> > (contact management) and maybe also a <priority> element and location, 
> > no?
> 
> Yes, although I'm not sure a microformat wouldn't be just as good. The 
> difference with the <time> element is that it can contain the minimal 
> amount of information for an event in a calendar:
> 
> | <time datetime="[event time]" title="[event name]">fallback</time>
> 
> That plus the ability to localize times and dates, in my opinion, give 
> the element critical mass.

Right. There are ways of including names without abusing semantics today 
(<span>, for one), but there really was no way to unambigiously include a 
date or time before <time>.

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



More information about the whatwg mailing list