我在我的网站上使用微数据,特别是LocalBusiness模式.我也读到了这个:schema.org:同一天的多个开放时间
但我想要的是每天定义开放时间是什么,因为它们可能会有很大不同.
我目前在其他例子中看到的是:
<time itemprop="openingHours" datetime="Tu-Fr 10:00-14:00">XYZ</time>
Run Code Online (Sandbox Code Playgroud)
我还可以使用这些选项中的任何一个吗?
<time itemprop="openingHours" datetime="Tu 10:00-14:00">XYZ</time>
<time itemprop="openingHours" datetime="Fr 11:00-14:00">XYZ</time>
Run Code Online (Sandbox Code Playgroud)
或这个
<meta itemprop="openingHours" content="Tu 10:00-14:00">XYZ
<meta itemprop="openingHours" content="FR 11:00-14:00">XYZ
Run Code Online (Sandbox Code Playgroud)
不仅如此,在某些日子里,企业可能只能通过预约开放.怎么指定?我假设当我在<time>规范中离开一天时,它将被解释为关闭,但是通过预约我不知道.
**更新**
我现在有这个:
<div itemprop="openingHoursSpecification" itemscope="" itemtype="http://schema.org/OpeningHoursSpecification">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Monday">
<time datetime="07:00">07:00</time> - <time datetime="01:00">01:00</time>
</div>
Run Code Online (Sandbox Code Playgroud)
我现在看到了Google丰富的代码段工具
项目类型:http://schema.org/localbusiness
property:
name:Syriana
description:
address:Item 1
openinghoursspecification:Item 2
openinghoursspecification:Item 3
第2项
类型:http://schema.org/openinghoursspecification
property:
dayofweek:http://purl.org/goodrelations/v1#Monday
我看到了这一天,但不是丰富的片段工具中的时间......为什么?
该LocalBusiness例如已更新,并显示的天跨度多次的例子.
<div itemscope itemtype="http://schema.org/Restaurant">
<span itemprop="name">GreatFood</span>
...
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
</div>
Run Code Online (Sandbox Code Playgroud)
更多来自以下描述openingHours:
一个企业的营业时间.开放时间可以指定为每周时间范围,从天数开始,然后是每天的时间.可以使用逗号','列出多天,每天分隔.使用连字符" - "指定日期或时间范围.
- 使用以下两个字母组合指定天数:Mo,Tu,We,Th,Fr,Sa,Su.
- 时间是使用24:00时间指定的.例如,下午3点被指定为15:00.
- 这是一个例子:周二和周四下午4-8点.
- 如果一个企业每周7天开放,则可以指定为全天的周一至周日.
尽管openingHours描述使用具有datetime属性的time元素,但是每周时间范围不是有效值,因此使用元元素可能是优选的.
此外,从Place派生的所有项类型也具有openingHoursSpecification属性.它比openingHours财产更有罗嗦.这个手杖的用法有点像这样:
<div itemscope itemtype="http://schema.org/Restaurant">
<span itemprop="name">GreatFood</span>
...
Hours:
<div itemprop="openingHoursSpecification" itemscope
itemtype="http://schema.org/OpeningHoursSpecification">
<meta itemprop="description" content="Lunch Hours">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Monday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Tuesday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Wednesday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Thursday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Friday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Saturday">
Mon-Sat
<time itemprop="opens" datetime="11:00">11am</time> -
<time itemprop="closes" datetime="14:30">2:30pm</time>
</div>
<div itemprop="openingHoursSpecification" itemscope
itemtype="http://schema.org/OpeningHoursSpecification">
<meta itemprop="description" content="Supper Hours">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Monday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Tuesday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Wednesday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Thursday">
Mon-Thu
<time itemprop="opens" datetime="17:00">5pm</time> -
<time itemprop="closes" datetime="21:30">9:30pm</time>
</div>
<div itemprop="openingHoursSpecification" itemscope
itemtype="http://schema.org/OpeningHoursSpecification">
<meta itemprop="description" content="Weekend Supper Hours">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Friday">
<link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Saturday">
Fri-Sat
<time itemprop="opens" datetime="17:00">5pm</time> -
<time itemprop="closes" datetime="22:00">10:00pm</time>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6997 次 |
| 最近记录: |