Back in October, Sean Hannan (@MrDys), Dan Scott (@denials), John Fink (@adr), and me (@gollydamn) talked about this on twitter and I'll see if I can track down the whole conversation. I'm not sure there's a de facto this-is-how-it-must-be-done, at least not yet, and there are definitely more correct examples than mine. In fact, mine's a little half-assed and less informed than what these other three could [or have] spun up. Sorry if the markup looks a little jacked courtesy of email formatting. Here's what your hours might look like for just Monday through Wednesday, assuming the actual hours are generated by a script (i.e., Matt Reidsma's Hours Script [https://github.com/mreidsma/Today-s-Hours]):
<aside itemscope itemtype="http://schema.org/LocalBusiness">
<time itemprop="openingHoursSpecification" datetime="Mo 07:30-23:00, Tu 11:00-22:00, We 09:00-14:00">
<ul>
<li itemprop="DayOfWeek">Monday: </li>
<li itemprop="DayOfWeek">Tuesday: </li>
<li itemprop="DayOfWeek">Wednesday: </li>
</ul>
</time>
</aside>
Here is the OpeningHoursSpecification: http://schema.org/OpeningHoursSpecification
Here's some info about the time element: http://html5doctor.com/the-time-element/
Here is an example on CodePen: http://codepen.io/michaelschofield/pen/jDrBb *
This example, however, was more about pulling hours from a json file than having solid microdata, but it's a start : ).
I'm definitely interested in revisiting this topic. Good question!
Michael
// Writing about the #libweb right hurr: www.ns4lib.com
-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Sara Amato
Sent: Monday, February 17, 2014 4:42 PM
To: [log in to unmask]
Subject: [CODE4LIB] schema.org library hours
Is anyone using schema.org markup for library hours?
We have our address marked up and google shows a "knowledge graph/card" when you search "hatfield library", and I'd love to be able to include the hours but am worried about accuracy - I have no idea how often google checks / updates this data, and it looks like the "valid through" property can't be applied to hours. I'd love to hear from a library trying this.
I did find one example of a knowledge card with hours, but didn't see markup on their page (anyone from OSU care to enlighten me?)
|