问题描述
我正在尝试为开放时间创建一个schema.org定义,该定义在Google丰富的片段测试工具中进行验证。
I'm trying to create a schema.org definition for openinghours, which validates in Google's rich snippets testing tool.
使用此标记,我想定义一个商店从11:00-22:00开放。
With this markup I want to define that on mondays a shop is open from 11:00-22:00.
<time datetime="Mo 11:00-22:00" itemprop="openingHours">11:00-22:00</time>
但是,丰富网页摘要测试工具显示:
However, the rich snippets testing tool displays:
Schema.org :
Schema.org defines:
-
使用以下两个字母的组合指定天数:Mo ,Tu,We,Th,Fr,Sa,Su。
Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
时间是使用24:00时间指定的。例如,下午3点被指定为15:00。
Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
以下是一个示例:< time itemprop =openingHoursdatetime = Tu,Th 16:00-20:00>星期二和星期四4-8pm< / time>
推荐答案
您还可以做的是将更加精细的开放时间模式从GoodRelations附加到schema.org节点: p>
What you can also do is attach a more granular opening hours pattern from GoodRelations to a schema.org node:
<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>
查看
这篇关于< time>中的Schema.org openingHours的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!