W3C home > Mailing lists > Public > public-vocabs@w3.org > May 2012

Why would one use time and datetime for a property with an expected type of date?

From: Aaron Bradley <aaranged@yahoo.com>
Date: Fri, 11 May 2012 13:03:48 -0700 (PDT)
Message-ID: <1336766628.16969.YahooMailNeo@web161003.mail.bf1.yahoo.com>
To: Public Vocabs <public-vocabs@w3.org>
In the schema.org example for Event one finds this [1]

<div itemprop="event" itemscope itemtype="http://schema.org/Event">
  <a href="foo-fighters-may23-midamericacenter" itemprop="url">
    <span itemprop="name">Mid America Center</span>
  </a>
  <span itemprop="location">Council Bluffs, IA, US</span>
  <meta itemprop="startDate" content="2011-05-23">May 23
  <a href="ticketmaster.com/foofighters/may23-2011" itemprop="offers">Buy tickets</a>
</div>

Great - the expected type for the property "startDate" is date, and the content for this property is a date in ISO 8601 format.


But in the discussion of dates in the "getting started" documentation [2] this example is provided:

<div itemscope itemtype="http://schema.org/Event">
  <div itemprop="name">Spinal Tap</div>
  <span itemprop="description">One of the loudest bands ever
  reunites for an unforgettable two-day show.</span>
  Event date:
  <time itemprop="startDate" datetime="2011-05-08T19:30">May 8, 7:30pm</time>
</div>

This second example seems exactly equivalent to me to the first - there's a date and time associated with itemprop="startDate".

So why would I use <time> tag and the datetime attribute when "startDate" expects a date?  Wouldn't this be equally unambiguous?
<meta itemprop="startDate" meta="2011-05-08T19:30">May 8, 7:30pm

Or, put in a reverse, why aren't I advised to this with the Event example?

  <time itemprop="startDate" datetime="2011-05-23">May 23</time>

The same is true of Recipe, where we find:
  Cook time: <meta itemprop="cookTime" content="PT1H">1 hour

But in the date section, this is provided:
<time itemprop="cookTime" datetime="PT1H30M">1 1/2 hrs</time>

Again, the two situations seem exactly equivalent to me.


For a property with expected type date, is <time> + datetime somehow better than <meta> + content?

Thanks!

[1] http://schema.org/Event
[2] http://schema.org/docs/gs.html#advanced_dates

Received on Friday, 11 May 2012 20:04:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 06:49:04 GMT