Saturday 18:00 to Sunday 03:00 is one overnight opening period, not an ordinary Sunday daytime schedule. Before publishing hours, separate the weekly pattern from holiday exceptions and from actual booking availability. Otherwise a venue can appear closed during its busiest late-night period.
Who should use this acceptance brief
Restaurants, venues and late-opening service businesses. Use this as a scoped commissioning task for a website supplier. Where system evidence is required, a teaching file is not a substitute.
Source-bound platform fact
Google’s local-business example represents an overnight interval with the opening day and a closing time after midnight in a single OpeningHoursSpecification. Special-date exceptions need separate handling. Google: local business · Checked 16 October 2026.
Filled teaching example
Synthetic example, not a client case. Inputs, expected decisions and counterexamples follow; no live platform integration is claimed.
On narrow screens, scroll to read the complete table.
| Input / case | Check basis | Expected decision |
|---|---|---|
| Sat 18:00 → Sun 03:00 | Sat 23:00 | open |
| same interval | Sun 02:59 | open |
| same interval | Sun 03:00 | closed in half-open model |
Run the acceptance exercise
- Get the approved opening-day convention from the venue manager.
- Compare signage, visible website hours and structured weekly records.
- Test before opening, before midnight, after midnight and exactly at closing; add a holiday override case.
Interpret the result and retain evidence
The teaching interval uses minutes from the start of a week and an exclusive closing boundary. Sunday 03:00 is therefore outside, not a one-minute extension. That boundary is a stated modelling choice for the fixture. Real trading exceptions and last-entry policies must be written separately by the business.
Limits before implementation
Not a timezone/DST calendar or proof the venue is open today. Avoid representing a regular weekly schedule as current capacity.
Replay the finite example
Save both files in one folder and run with Node22.13 or newer. These finite checks are not a live service or certification. Filled inputs and expected outputs · Inspectable functions
node decision-check.mjs overnight-opening-hours.json