-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Days of week and special/closing OpeningHoursSpecification #923
Conversation
Another remark: I am not sure why but the range for |
Thanks for the proposal! However, I think the "opening hours" branch of schema.org is a non-trivial challenge and I suggest that we try to first work on a comprehensive solution to the pending challenges instead of an incremental approach with quick fixes, because quick fixed will likely constrain our redesign. |
Not sure what to do with that... Does anybody really care? I mean, there's been open issues around So we have several options from here:
In my opinion, Google's approach is simple, elegant, and answers most of the issues listed above. No surprise this PR mostly reflects that. The only difference is about |
Nudging this thread. See also #245 and #921 comments. @mfhepp - w.r.t. comprehensive solution, which issues would you seek to address beyond those identified by @betehess ? Opening Hours are worth a bit of polish without overloading that task with defining an entirely general purpose scheduling mechanism. There may be other related usecases we can address later more comprehensively for other kinds of repeating schedule... |
Reviewing this i.e. http://schema.org/Monday rdfs:label: Monday, rdfs:comment: The first day of the week. ... can we come up with a better description of "Monday"? It is not a strong convention to count from Monday = 1. E.g. from http://www.timeanddate.com/calendar/days/
I quite like the way Wikipedia ground https://en.wikipedia.org/wiki/Monday - i.e. as being between Sunday and Tuesday. I would also like (in the machine-readable representation) to associate Monday with https://www.wikidata.org/wiki/Q105 and so on, both to build up our links with Wikidata and to get multilingual labels for all these items. |
Very good remark. I have updated the PR accordingly.
I have done something like that: <span>Same as: <a property="schema:sameAs" href="http://www.wikidata.org/entity/Q105">Monday</a></span> Is that the right approach? |
re sameAs, we haven't made a mapping to wikidata URIs before, but that looks plausible. Perhaps better to use the https variant, though I'm not sure which they consider the most canonical URI. - i.e. https://www.wikidata.org/wiki/Q105 |
That's the Concept URI (bottom left link of the Wikidata page), which gets redirected to the page URL when in a browser. Note the entity vs wiki in the path. |
I meant http versus https versions of the entity URI |
@danbri the entity URI really is the http version, even if the https one resolves. The statement |
That being said, I am still not happy with my PR because of https://github.com/schemaorg/schemaorg/pull/923/files#diff-473245f5cdaf7ff4e5dd3462e1a62bbcR180 . I still don't understand how/where I can modify the JSON-LD context :-/ |
1c70a69
to
bdc8fda
Compare
Re JSON-LD context, the trick we use currently is that properties that have a domainIncludes of URL (alongside potentially others) get treated as expecting "@id" from a JSON-LD perspective. That catches the common case of relative URI references, where you don't want a dangling "../news/more.html" text value to end up in the parsed output instead of a full URI. The context is entirely generated from the master schemas in data/ but the exact structure has been evolving as we figure things out. The most recent change (this week) #990 should be both harmless and useful: we just take care to associate all schema.org terms with the schema.org vocabulary explicitly, so that our context file can be mixed in alongside others without confusion. This came out of collaboration with GS1 towards http://gs1.org/voc/ and the issues were not apparent when the context file implementation was first put together. |
I have merged this (thanks @betehess !) and made some modest tweaks to the description. Also carried over the public holiday type from GR. What happened to the idea of specialClosingDay - should that be spec'd and added too? |
Closing per http://webschemas.org/docs/releases.html#g923 (but ping re specialClosingDay) |
@danbri I fail to understand how In practice, I am not sure a Maybe an example would help? But until this is figured out, can we remove it from sdo-deimos? I don't think |
This is already handled with the combination of
|
Ok, great, just wanted to make sure. If you've time to look over the changes that have been merged in, that would be great. Extra sanity checks are always useful! |
@danbri I did (not just my contributions), and everything else looks good! |
Thanks for checking! Re PublicHolidays, indeed it seemed under-discussed, but on the basis that we are replacing a structure that has been in place since 2012 (http://blog.schema.org/2012/11/good-relations-and-schemaorg.html). I wanted to make the new schema.org URLs a drop-in replacement for the GoodRelations ones. If we want to deprecate that construction we can work out a design for doing so and make that clear in the /PublicHolidays documentation. But to just abruptly omit it without explanation would I think be even more confusing. I've filed an issue to track this at #1139 |
This is an actual proposal to tackle #245 and #921 (and possibly other issues). Please keep in mind that this is my first PR against Schema.org so I have probably missed a few things.
This adds 7 instances for each day of the week. References to GoodRelations in the docs and the examples should have been updated.
I tried to keep the current semantics as intact as possible. The "closing day" and "late night" use-cases are addressed by refining the definition of
OpeningHoursSpecification
. Special opening hours overriding typical opening hours are possible through the newspecialOpeningHoursSpecification
property.A few remarks:
"dayOfWeek": { "@type": "@id" }
in its context while that should be the default