# openingHoursSpecification present for business listings, encoding all 7 days

- **Pattern:** `ab-001021` (`directory-listing-schema.structured-data.opening-hours`)
- **Severity:** low
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-001021
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-001021)

## Why it matters

Incomplete `openingHoursSpecification` in structured data forces users to contact the business or visit in person to confirm hours — and misleads them when the schema implies all unlisted days are open by omission. Schema-org `OpeningHoursSpecification` requires explicit entries for every day of the week, including closures; a 5-day entry covering Monday–Friday leaves Saturday and Sunday in an undefined state that search engines may interpret as open. Users who show up based on incorrect Google knowledge panel hours generate negative reviews. For directories competing on data quality, missing hours degrade the product's core value proposition of replacing a phone call.

## Severity rationale

Low because incomplete hours reduce listing usefulness and search-panel accuracy but do not cause data corruption or security exposure; the failure is cosmetic and informational.

## Remediation

Populate `openingHoursSpecification` for all seven days when rendering listing JSON-LD. Closed days must be explicitly included with empty `opens`/`closes` strings rather than omitted.

```ts
// lib/hours-schema.ts
const DAYS = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] as const;

export function buildHoursSpec(hours: Record<string, { opens: string; closes: string } | null>) {
  return DAYS.map(day => ({
    "@type": "OpeningHoursSpecification",
    "dayOfWeek": day,
    "opens": hours[day]?.opens ?? "",
    "closes": hours[day]?.closes ?? "",
  }));
}
```

Call `buildHoursSpec(listing.hours)` inside your `buildListingSchema` helper and assign the result to `"openingHoursSpecification"`. Validate the output in Google's Rich Results Test after deploy.

## Detection

- **ID:** `opening-hours`
- **Severity:** `low`
- **What to look for:** List all listings with opening hours. For each, for business/restaurant directories, check JSON-LD for `openingHoursSpecification`. Verify it includes entries for all 7 days of the week (or documents which days are closed).
- **Pass criteria:** For business listings, `openingHoursSpecification` is present and includes all 7 days (with both open and closed days represented) — at least 7 day entries per listing (Monday through Sunday) in structured format. Report: "X listings with hours found, all Y use structured openingHoursSpecification."
- **Fail criteria:** `openingHoursSpecification` is missing or incomplete (e.g., only contains 3 days).
- **Skip (N/A) when:** Your directory is not a business/restaurant directory, or listings don't have operating hours.
- **Detail on fail:** Example: `"openingHoursSpecification missing from JSON-LD"` or `"Only includes Monday-Friday; Saturday and Sunday not included"`
- **Remediation:** Populate opening hours for all days:

  ```ts
  const jsonLd = {
    "@type": "LocalBusiness",
    "openingHoursSpecification": [
      { "dayOfWeek": "Monday", "opens": "09:00", "closes": "17:00" },
      { "dayOfWeek": "Tuesday", "opens": "09:00", "closes": "17:00" },
      { "dayOfWeek": "Saturday", "opens": "10:00", "closes": "14:00" },
      { "dayOfWeek": "Sunday", "opens": "", "closes": "" }
    ]
  }
  ```

---

## External references

- schema-org openingHoursSpecification
- schema-org OpeningHoursSpecification

Taxons: findability

HTML version: https://auditbuffet.com/patterns/ab-001021
