The weekly_schedule model works in conjunction with local_business model. The weekly_schedule model allows you to specify the hours in which a local business is open. In this example, we have created a weekly_schedule named schedule that shows that the business is open from 9AM - 5PM weekdays.
More columns could be added to add additional times during the day that are open and more rows can be added to specify the schedules for other days.
Referencing the Schedule
The weekly schedule can be referenced on one or more local_business specifications as shown here:
Notice that this is for the Default Schedule. If the local business has only one location then only the default schedule is needed. If the business has multiple locations and these locations don't all have the same schedule you will need to define multiple weekly_schedule definitions, one for each different set of hours. You can override the schedule for the locations that don't use the default schedule using the Local Address grid. Here we see that one of the business locations has been overridden to use an alternate schedule named six-day-schedule.
Showing the Schedule in the Rendered JSON
The schedule above will appear in the rendered JSON schema as:
"openingHours": "Mo-Fr 09:00-17:00"
To learn how to render this schema please refer to the local_business model help.
Keep in mind that the h parameter must be passed to the $local_business function in order to have the hours included.
The following schedules are defined in system and, as such, can be referenced without having to create these at the site level: