2016-06-23 36 views

答えて

1

openingHours施設は特定の日付を除くことはできません。 。 specialOpeningHoursSpecification

ます(openingHoursにより表現の代替である)openingHoursまたはopeningHoursSpecificationで指定された一般的な営業時間を変更することができます。

プロパティspecialOpeningHoursSpecificationopeningHoursSpecificationは、値としてOpeningHoursSpecificationをとります。

OpeningHoursSpecificationには、dayOfWeekプロパティを使用して、その日を指定できます。 DayOfWeekの値(列挙型)が必要です。これは、週の各曜日の値(MondayTuesday、など)だけでなく、「特別な」値PublicHolidaysが含まれています

これが祝日である任意の日を表します。特定の場所にある公式の公休日のプレースホルダです。

だから、あなたは(あなたの場所の)祝日は休業している状態にしたい場合は、このようなものを使用することができます

<div itemprop="specialOpeningHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification"> 
    <link itemprop="dayOfWeek" href="http://schema.org/PublicHolidays" /> 
    <p itemprop="description">‎Closed on public holidays.</p> 
</div> 

(それはopens財産ではないので、それが閉じていますことを伝える

+0

おかげで、それはあなたが持っていることを恥です手動で日付のロジックを行うことはできますが、少なくとも可能です。 [OpeningHoursSpecification](http://schema.org/OpeningHoursSpecification)には、[OpeningHoursSpecification](http://schema.org/OpeningHoursSpecification)と[OpenHoursSpecification]の2つのバージョンもあることが判明しました。 openingHoursSpecification](http://schema.org/openingHoursSpecification)を参照してください。それは改善することができた! – joep

+0

@ user1463467:** A)** "日付を手動で入力する"の代わりになるのは何ですか? (正直な質問) - ** B)** 2つのバージョンについて:OpeningHoursSpecificationはタイプで、openingHoursSpecificationはプロパティです。マイクロデータでは、例えば、「itemprop = "openingHoursSpecification" itemscope itemtype = "http://schema.org/OpeningHoursSpecification"」(すなわち、ケースの問題)である。それとも別の何かを意味するのですか? – unor

+1

** ** **最終的にロケールに依存する国の祝日のブール値になる可能性があります(ここで説明します)(https://github.com/schemaorg/schemaorg/issues/1139)。 ** B **:はい、それは私が意味していた、私はそれを指摘していた誰かを捕まえた。[OpeningHoursSpecification](http://schema.org/OpeningHoursSpecification)の「例2」は、あなたがそれをしたければそれをマークアップするための良い方法のようです。 – joep

0

実際には、すでに確立されているhttp://schema.org/openingHoursSpecificationは、特定の日付を、そこに添付されているOpeningHoursSpecificationのvalidFromおよびvalidThroughプロパティで除外することができます。

例としてhttp://ebusiness-unibw.org/pipermail/goodrelations/2010-October/000261.htmlを参照してください。例は(今schema.orgに統合)の元GoodRelationsの語彙のコンテキストであることに注意してください、ので、いくつかの命名の違いがあり、ここで説明:入力用

http://wiki.goodrelations-vocabulary.org/Cookbook/Schema.org#Naming_Differences

関連する問題