Schema.org openingHours w/ multiple times & days t

2019-04-28 16:29发布

问题:

I've looked at the Schema.org spec for opening hours, but it seems to fail to address two key items: 1) Localbusinesses that have multiple hours (ie 8-12, 1-5 with the hole in the middle being closed for lunch) 2) Days where the business is closed altogether.

I can't find any examples of anyone else doing it on google, this is my code for just normal hours (9-5) and my GUESS for how to handle days that are closed.

Can someone chime in on multiple hours and confirm my handling of closed days is correct?

<time itemprop="openingHours" datetime="Mo 08:30-12:00">
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Monday</div>
<div style="float:left;padding:5px;">
08:30AM - 12:00PM
</div>
</time>

<br />
<time itemprop="openingHours" datetime="Tu 08:30-12:00">
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Tuesday</div>
<div style="float:left;padding:5px;">
08:30AM - 12:00PM
</div>
</time>
<br />
<time itemprop="openingHours" datetime="We 08:30-12:00">
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Wednesday</div>
<div style="float:left;padding:5px;">
08:30AM - 12:00PM
</div>
</time>
<br />

<time itemprop="openingHours" datetime="Th 08:30-12:00">
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Thursday</div>
<div style="float:left;padding:5px;">
08:30AM - 12:00PM
</div>
</time>
<br />
<time itemprop="openingHours" datetime="Fr 10:10-12:00">
<div style="font-weight:bold;width:100px;margin-  right:10px;padding:5px;clear:both;float:left;">Friday</div>
<div style="float:left;padding:5px;">
10:10AM - 12:00PM
</div>
</time>
<br />
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Saturday</div>

<div style="float:left;padding:5px;">
<em>Closed</em>
</div>
<br />
<div style="font-weight:bold;width:100px;margin-right:10px;padding:5px;clear:both;float:left;">Sunday</div>
<div style="float:left;padding:5px;">
<em>Closed</em>
</div>

回答1:

The 2nd example on the LocalBusiness schema page appears to illustrate both the issues which you've raised:

Hours:
<meta itemprop="openingHours" content="Mo-Sa 11:00-14:30">Mon-Sat 11am - 2:30pm
<meta itemprop="openingHours" content="Mo-Th 17:00-21:30">Mon-Thu 5pm - 9:30pm
<meta itemprop="openingHours" content="Fr-Sa 17:00-22:00">Fri-Sat 5pm - 10:00pm

This shows a restaurant that closes for a couple hours during the afternoon and is not open on Sundays (implied by no given openingHours for Sunday).