1

While Schema.org writes

Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.

on the HTML5 validator I get this error:

Bad value Mo, Tu, We, Th, Fr 09:00-16:00 for attribute datetime on element time: The literal did not satisfy the time-datetime format.

…" datetime="Mo, Tu, We, Th, Fr 09:00-16:00">every work day 9am to 16pm </time></li>

I really want to communicate the opening hours (and days) in Microdata, but it seems this is in conflict with HTML5.

Is there a format that is good for both or I should keep it for the bots and care not about valid HTML in this case?

unor
  • 92,415
  • 26
  • 211
  • 360
Ákos Nikházy
  • 1,276
  • 17
  • 33
  • 1
    possible duplicate of [schema.org openinghours](http://stackoverflow.com/questions/8152854/schema-org-openinghours) – leo Jan 22 '15 at 12:03

2 Answers2

2

Don’t use the time element.

It’s an error with Schema.org’s documentation. I reported this issue in the Schema.org tracker and it will likely be fixed in the next release.

Possible alternatives:

  • data element:

    <data itemprop="openingHours" value="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</data>
    
  • meta element (which can be used in the body):

    <meta itemprop="openingHours" content="Tu,Th 16:00-20:00"> Tuesdays and Thursdays 4-8pm
    
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
0

I would suggest to keep what you have and not worry about the HTML validator which is only a guide at any rate.

Ian Devlin
  • 18,534
  • 6
  • 55
  • 73