Re: LocalBusiness - openinghours. How to denote exceptions (like holidays? )

Hi,
what you can do is attach more granular opening hours information using GoodRelations (http://purl.org/goodrelations/) as an extension for schema.org.
By means of the validFrom/validThrough property, you can specify individual opening hours on the level of single days, too.
This should already work as of now. It may not be displayed by all search engines, but due to their generic Microdata parser, they should be able to handle it.

Example:

<div itemscope itemtype="http://schema.org/Place" itemid="#store">
  <link itemprop="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" 
        href="http://purl.org/goodrelations/v1#Location" />
  <span itemprop="name">Hepp's Happy Burger Restaurant</span>
  <div itemprop="http://purl.org/goodrelations/v1#hasOpeningHoursSpecification" itemscope 
       itemtype="http://purl.org/goodrelations/v1#OpeningHoursSpecification">
Opening hours: Mo-Fri,
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Monday" />
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Tuesday" />
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Wednesday" />
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Thursday" />
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Friday" />
     <meta itemprop="opens" content="08:00:00">8:00 a.m. -
     <meta itemprop="closes" content="20:00:00">8:00 p.m.
  </div>
</div>

If you have the same opening hours for all public holidays, use this:

<div itemscope itemtype="http://schema.org/Place" itemid="#store">
  <link itemprop="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" 
        href="http://purl.org/goodrelations/v1#Location" />
  <span itemprop="name">Hepp's Happy Burger Restaurant</span>
  <div itemprop="http://purl.org/goodrelations/v1#hasOpeningHoursSpecification" itemscope 
       itemtype="http://purl.org/goodrelations/v1#OpeningHoursSpecification">
Opening hours on public holidays:,
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#PublicHolidays" />
     <meta itemprop="opens" content="08:00:00">8:00 a.m. -
     <meta itemprop="closes" content="20:00:00">8:00 p.m.
  </div>
</div>

If you want to specify opening hours for special periods, e.g. Sundays in December 2011, use this:

<div itemscope itemtype="http://schema.org/Place" itemid="#store">
  <link itemprop="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" 
        href="http://purl.org/goodrelations/v1#Location" />
  <span itemprop="name">Hepp's Happy Burger Restaurant</span>
  <div itemprop="http://purl.org/goodrelations/v1#hasOpeningHoursSpecification" itemscope 
       itemtype="http://purl.org/goodrelations/v1#OpeningHoursSpecification">
     <time itemprop="validFrom" datetime="2011-12-01T00:00:00Z"></time> 
     <time itemprop="validThrough" datetime="2011-12-31T23:59:59Z"></time> 
Opening hours on Sundays in December 2011: 
     <link itemprop="hasOpeningHoursDayOfWeek" 
           href="http://purl.org/goodrelations/v1#Sunday" />
     <meta itemprop="opens" content="08:00:00">8:00 a.m. -
     <meta itemprop="closes" content="20:00:00">8:00 p.m.
  </div>
</div>

Best

Martin
On Oct 12, 2011, at 12:15 AM, Geert-Jan Brits wrote:

> Hi all, 
> 
> New to this mailinglist, and to digesting all that's in schema.org and related efforts. Finally a defacto standard that the community at large seems to be embracing.. (hopefully)
> 
> First of all is this the correct place to be discussing revisions to the various schema's? 
> 
> While glancing over the various schema's I noticed that LocalBusiness.openinghours, doesn't seem to support 'exceptional days' (like holidays)  in which the openinghours might be different from the standard openinghours derived form dayOfWeek. Has this issue already been raised? (in some ticket repo or something  I might not be aware off? ) 
> 
> Coming from the Leisure/travel branche, I come across these type of irregularities pretty often, and feel there's a need to address them properly from the start. 
> 
> For a pretty thorough (and ongoing) discussion on openinghours have a look at : 
> http://wiki.openstreetmap.org/wiki/Talk:Key:opening_hours
> 
> some other issues raised: http://www.mail-archive.com/code4lib@listserv.nd.edu/msg10670.html
> 
> So before providing my 2 cents on how the openinghours-definition could be modified/extended: is there some ongoing discussion that you're aware of, that is already doing this? 
> 
> Thanks, 
> Geert-Jan

Received on Wednesday, 12 October 2011 13:54:10 UTC