spatie/opening-hours
Query and format a set of opening hours observed · 2026-08-28
Health v2 · maintenance only
95/100
- Activity 95
- Release rhythm 92
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 13
- age_days: 3627
- days_rel: 55
- days_push: 30
- n_releases_24m: 10
Adoption not part of the score
1720 stars · 118 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A PHP library for modeling, querying, and formatting a business's opening hours, including regular weekly schedules and date-based exceptions. It integrates with Carbon via cmixin/business-time for direct use on date objects.
Use cases
- check if a store is open right now in php
- display weekly opening hours on a website
- query opening hours for a specific date with holiday exceptions
- format business hours per day for a shop
- determine if a datetime falls within business hours
- handle recurring holiday closures in a schedule
When to choose
- you need to model and query business opening hours in PHP or Laravel
- you need exception dates like holidays on top of a weekly schedule
- you want to display 'open now' status on a website
When to avoid
- you need full calendar or event scheduling beyond opening hours
- you're not working in PHP
- you need timezone-aware multi-location scheduling with complex rules
Facets
library · maturity stable
date-time sdk developer-tools web-development php opening-hours schedule business-hours calendar spatie
3 sources
- readme: https://github.com/spatie/opening-hours · fetched 2026-08-28 · a9217c279899
- homepage: https://freek.dev/595-managing-opening-hours-with-php · fetched 2026-08-29 · 08b30c5df942
- site_page: https://freek.dev/about · fetched 2026-08-29 · e0ef9dccbb05
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/opening-hours | main | 95 |
For agents
markdown · JSON · MCP: product_card(name="spatie/opening-hours")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem