PHP Package: spatie/opening-hours

Spatie's PHP library for handling opening hours efficiently and accurately, designed for businesses and organizations to manage their schedules effectively.

Current Version: 4.2.1
Last Updated: 2025-05-24
PHP Requirement: ^8.2
Dependencies:
illuminate/support
phpunit/phpunit
guzzle/guzzle
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

The 'opening-hours' PHP library by spatie offers a comprehensive solution for managing and displaying business hours. With support for various scheduling scenarios and time zones, this library facilitates the seamless integration of opening hours into websites or applications.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 4.2.1

Download Download v4.2.1

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/opening-hours/4.2.1/loader.php';
require_once 'libs/illuminate/support/12.40.2/loader.php';
require_once 'libs/sebastianbergmann/phpunit/12.4.4/loader.php';
require_once 'libs/guzzle/guzzle/7.10.0/loader.php';

use Spatie\OpeningHours\OpeningHours;
use Illuminate\Support\Carbon;
use PHPUnit\Framework\TestCase;

$obj = new OpeningHours();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.