schema.org:同一天有多个开放时间 [英] schema.org: Multiple opening hours on same day

查看:59
本文介绍了schema.org:同一天有多个开放时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一家小型商店建立一个网站,并希望实施 schema.org-microdata-markup.问题":这家商店的营业时间为周二至周五——这些天从 10:00 到 14:00 从 16:30 到 23:00.所以我就这样实现了营业时间……

I'm building a website for a small store and want to implement schema.org-microdata-markup. The "problem": The store is opened from Tuesday till Friday – from 10:00 till 14:00 AND from 16:30 till 23:00 on these days. So I implemented the opening hours like this…

<time itemprop="openingHours" datetime="Tu-Fr 10:00-14:00, 16:00-23:00">XYZ</time>

但是这样,HTML 验证器说...

But this way, the HTML-validator says…

元素时间上的属性日期时间的错误值 Tu-Fr 10:00-14:00、16:00-23:00:文字不满足时间-日期时间格式.

Bad value Tu-Fr 10:00-14:00, 16:00-23:00 for attribute datetime on element time: The literal did not satisfy the time-datetime format.

我怎样才能实现这些每天多个开放时间?或者使用 -tag 无法做到这一点,我必须将其更改为 -tags?谢谢你的帮助!:-)

How can I implement these multiple opening hours a day? Or is it impossible to do this with the <time>-tag and I have to change it to <meta>-tags? Thanks for your help! :-)

推荐答案

问题是 schema.org 用于 openHours 的符号对 时间元素的 HTML5 规范.

The problem is the notations schema.org uses for openingHours are just not (yet) valid by the HTML5 spec for the time element.

您可以复制 LocalBusiness 中的所有示例" rel="nofollow">验证器,它们都将无法通过验证.

You can copy all the examples from LocalBusiness in the Validator and they will all fail validation.

除非规范包含在时间元素中编写openingHours 的定义,否则恐怕您将不得不忽略HTML 验证器.

Until the spec contains a definition to write openingHours in a time element you will have to ignore the HTML validators I'm afraid.

顺便说一句.schema.org 站点上的文本暗示您可以在一个值中定义多次:

BTW. The text on the schema.org site implies you could defines multiple times in one value:

商家的营业时间.营业时间可以指定为每周时间范围,从天开始,然后是每天的次数.

The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day.

这篇关于schema.org:同一天有多个开放时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆