Schema.org openingHours w/ multiple times & days that are closed

a 夏天 提交于 2019-12-10 04:25:00

问题


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).



来源:https://stackoverflow.com/questions/8918284/schema-org-openinghours-w-multiple-times-days-that-are-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!