Closed greggish closed 11 months ago
We will definitely need this once we expand to the middle east where my understanding is that businesses often close at lunch.
I was doodling on what a wire representation might look like, supporting both the time range of applicability and multiple opening hours in the same day. Need better names for the two "hours" nodes. I also realize that using the wire format as part of the discussion of the storage spec is a little backwards, but I think this outlines what I think our use case will be.
Example:
schedule: [
{
applies_from_date: 2017-12-10,
applies_until_date: 3000-12-31,
hours: [
{
weekdays: ["Mo", "We", "Fr"],
hours: [
{
open_from_time: 09:00,
open_until_time: 13:00
},
{
open_from_time: 16:00,
open_until_time: 21:00
}
]
},
{
weekdays: ["Sa", "Su"],
hours: [
{
open_from_time: 10:00,
open_until_time: 17:00
}
]
}
]
}
]
Schema.org has a good terse approach openingHours which we should explore.
From their docs:
<time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>
.This doesn't allow HSDS to handle the question of 'will the service be open on X day three weeks in the future' - but I'm not certain we should try and capture that - as that is something that systems will vary in their capacity to cope with. Instead, we might want to see a responsible system consuming data (a) checking back regularly with the authoritative source to see if the latest current opening hours have changed; (b) advising users on when it was last updated.
This is also related to #167
Closing, as I believe this has been addressed in #167 with the adoption of RRULE allowing for multiple different opening and closing times.
via @derekfidler's comment on our ReadTheDocs:
Not sure if this would be a schema change or if there can just be guidance in the definition.