营业时间超过午夜

Opening hours go over midnight

是否可以设置开放时间,例如从22:00到03:00?

在Schema.org的openingHours. If it’s not working with openingHours, does it work with the properties opens/closes from OpeningHoursSpecification的描述中没有定义?

例如像这样:

<div itemprop="openingHoursSpecification" itemscope 
       itemtype="http://schema.org/OpeningHoursSpecification">Mo,
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Monday" />
     <meta itemprop="opens" content="22:00:00">22:00 -
     <meta itemprop="closes" content="03:00:00">03:00
  </div>

我对此没有任何经验,但我认为像这样使用 opens and closes 应该没问题,正如他们的描述所说

The opening hour of the place or service on the given day(s) of the week.
The closing hour of the place or service on the given day(s) of the week.

和"the given day(s) of the week",开市时间22:00,闭市时间03:00, 不管是不是上次开盘的关门时间

但是,Martin Hepp explained in an email 应该如何使用他的 GoodRelations 词汇表中的 OpeningHoursSpecification,并且由于 Schema.org 的 class 是从这里派生出来的,所以它可能是相关的:

I.e., opening hours that cross midnight must be broken into two chunks, one opening hour specification for the first day, then closing at 23:59:59, and one for the next day of the week, opening ant 00:00:00.

所以根据这个,你将不得不使用像这样(丑陋)的东西:

<div itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
 <link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Monday" />
 <meta itemprop="opens" content="22:00:00">
 <meta itemprop="closes" content="23:59:59">
</div>

<div itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
 <link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Tuesday" />
 <meta itemprop="opens" content="00:00:00">
 <meta itemprop="closes" content="03:00:00">
</div>

<div itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
 <link itemprop="dayOfWeek" href="http://purl.org/goodrelations/v1#Tuesday" />
 <meta itemprop="opens" content="22:00:00">
 <meta itemprop="closes" content="23:59:59">
</div>

(不是每天都重复,你可以在两个 OpeningHoursSpecification 和多个 dayOfWeek 中指定它,当然,除非时间不同。)