Registry / utility / spatie-opening-hours

spatie-opening-hours

JSON →
library4.2.1phppackagistunverified

A helper to query and format a set of opening hours.

composer require spatie/opening-hours
INSTALL
IMPORT
SIG · SPATIE-OPENING-HOU
S
spatie-opening-hours
utilityphpv4.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OpeningHours
use Spatie\OpeningHours\OpeningHours;

Creates opening hours and checks if open at a given time.

use Spatie\OpeningHours\OpeningHours; $hours = OpeningHours::create([ 'monday' => ['09:00-18:00'], ]); echo $hours->isOpenAt(new DateTime('2023-01-02 10:00'));
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.2.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
spatie-opening-hours — pip install spatie-opening-hours · libregistry