我正在以这种方式在JSON-LD中使用Schema.org OpeningHoursSpecification
:
[{"@type":"OpeningHoursSpecification","dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"],"open":"08:00","closes":"20:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Saturday"],"open":"08:00","closes":"14:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Sunday"],"open":"00:00","closes":"00:00"}]
我找不到任何适应本规范以包含“午睡”的例子 - 例如当一个地方运作时从上午8点到下午1点,下午3点到晚上8点。
答案 0 :(得分:2)
编辑PER @UNOR
这可能会让你开始:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Service",
"url": "http://www.example.com/",
"hoursAvailable": [{
"@type": "OpeningHoursSpecification",
"opens": "08:00",
"closes": "13:00",
"dayOfWeek": [{
"@type": "DayOfWeek",
"@id": "http://schema.org/Monday",
"name": "Monday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Tuesday",
"name": "Tuesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Wednesday",
"name": "Wednesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Thursday",
"name": "Thursday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Friday",
"name": "Friday"
}]
},
{
"@type": "OpeningHoursSpecification",
"opens": "15:00",
"closes": "20:00",
"dayOfWeek": [{
"@type": "DayOfWeek",
"@id": "http://schema.org/Monday",
"name": "Monday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Tuesday",
"name": "Tuesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Wednesday",
"name": "Wednesday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Thursday",
"name": "Thursday"
},
{
"@type": "DayOfWeek",
"@id": "http://schema.org/Friday",
"name": "Friday"
}]
}]
}
</script>
您可以使用更精确的@Service
类型进行修饰,并添加时区信息。