php-store-hours
php-store-hours copied to clipboard
group days with identical hours question
I have just integrated this into my website and it's working perfect, just quick question
Also can the exceptions be date ranges so the opening times for dates 7/4/2020 to 7/31/2020 instead of listing the individual dates, below is the current code
`// REQUIRED // Set your default time zone (listed here: http://php.net/manual/en/timezones.php) date_default_timezone_set('Europe/London'); // Include the store hours class require DIR . '/StoreHours.class.php';
// REQUIRED // Define daily open hours // Must be in 24-hour format, separated by dash // If closed for the day, leave blank (ex. sunday) // If open multiple times in one day, enter time ranges separated by a comma $hours = array( 'mon' => array('09:30 - 18:30'), 'tue' => array('09:30 - 18:30'), 'wed' => array('09:30 - 18:30'), 'thu' => array('09:30 - 18:30'), 'fri' => array('09:30 - 18:30'), 'sat' => array('10:00 - 18:00'), 'sun' => array('10:00 - 18:00') );
// OPTIONAL // Add exceptions (great for holidays etc.) // MUST be in a format month/day[/year] or [year-]month-day // Do not include the year if the exception repeats annually $exceptions = array( '7/04/20' => array('10:00-17:00'), '10/18/20' => array('10:00-17:00') );
$config = array( 'open' => "