我正在尝试为 openinghours 创建 schema.org 定义,该定义在 Google 的丰富摘要测试工具中进行验证。
通过此标记,我想定义商店每周一的营业时间为 11:00-22:00。
<time datetime="Mo 11:00-22:00" itemprop="openingHours">11:00-22:00</time>
但是,丰富的摘要测试工具显示:
警告:openinghours 指的是非 ISO 8601 的日期时间格式。
Schema.orgdefines http://schema.org/openingHours:
企业的营业时间。开放时间可以指定为每周的时间范围,从天开始,然后是每天的时间。可以列出多天,并用逗号“,”分隔每一天。使用连字符“-”指定日期或时间范围。
使用以下两个字母组合指定日期:Mo、Tu、We、Th、Fr、Sa、Su。
时间指定为 24:00 时间。例如,下午 3 点指定为 15:00。
这是一个例子:<time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>
您还可以做的是将 GoodRelations 中更精细的营业时间模式附加到 schema.org 节点:
<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>
See
http://www.heppnetz.de/ontologies/goodrelations/v1.html#OpeningHoursSpecification http://www.heppnetz.de/ontologies/goodrelations/v1.html#OpeningHoursSpecification
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)