I have to mark the hours of the company using HTML5 microdata. After some searching on Google and schema.org, I wrote the following code:
<time itemprop="openingHours" datetime="Mo 13:00-17:30"><span class="day">Maandag:</span> <span class="hours">13:00-17:30</span></time> <time itemprop="openingHours" datetime="Tu 09:00-17:30"><span class="day">Dinsdag:</span> <span class="hours">09:00-17:30</span></time> <time itemprop="openingHours" datetime="We 09:00-17:30"><span class="day">Woensdag:</span> <span class="hours">09:00-17:30</span></time> <time itemprop="openingHours" datetime="Th 09:00-17:30"><span class="day">Donderdag:</span> <span class="hours">09:00-17:30</span></time> <time itemprop="openingHours" datetime="Fr 09:00-21:00"><span class="day">Vrijdag:</span> <span class="hours">09:00-21:00</span></time> <time itemprop="openingHours" datetime="Sa 08:30-15:00"><span class="day">Zaterag:</span> <span class="hours">08:30-15:00</span></time>
When I test a website with the Google Structured Data Testing Tool, I see that structured data is recognized correctly. The problem is that one of the requirements for this assignment is that it complies with the HTML W3C validator. For each time element, I get the following error.
Bad value Mo 13:00-17:30 for attribute datetime on element time: The literal did not satisfy the time-datetime format.
I get, why I get this error, what I am not getting is how I can specify the time of my opening so that they are marked with Microdata HTML data and that they are also valid HTML according to the HTML5 validator.
Hope you guys can help me with this. :)
Weszzz7
source share