Schema.org for closed on a holiday / given date

天大地大妈咪最大 提交于 2019-12-04 19:34:09

This is the ld+json format, but say you are closed for Christmas, just leave the opening & closed hours blank, like I did for regular openingHours below. This test business is closed Sunday, so I just don't enter any time for it at all.

 ...
 "telephone": "123-555-1212",
 "openingHours": "Mo,Tu,We,Th 09:00-19:00, Fr 09:00-20:00, Sa 09:00-18:00",
 {
     "@type": "OpeningHoursSpecification",
     "validFrom": "2015-12-25",
     "validThrough": "2015-12-25"
  },
  "address": {
      ...
  }

Don't know if things has changed since you posted this @Nathan but this is the only way I could get https://developers.google.com/structured-data/testing-tool/ to validate properly. By specifying "openingHoursSpecification" outside of the brackets.

"openingHours": "Mo,Tu,We,Th 09:00-19:00, Fr 09:00-20:00, Sa 09:00-18:00",
"openingHoursSpecification":
        {
            "@type": "OpeningHoursSpecification",
            "validFrom": "2015-12-25",
            "validThrough": "2015-12-25"
        }

You could possibly handle it that way, Christopher, but you need to mark up the time down to the seconds (00:00:00) in this situation. It's because the business would open at 00:00:00 and close at 00:00:01. Or another way to do it would be simply to specify the days of the year that the business is open and leave out any mark up for the days that the business is closed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!