Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group days with identical hours question #29

Open
ianhaneybeechwood opened this issue Jul 4, 2020 · 0 comments
Open

group days with identical hours question #29

ianhaneybeechwood opened this issue Jul 4, 2020 · 0 comments

Comments

@ianhaneybeechwood
Copy link

ianhaneybeechwood commented Jul 4, 2020

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' => "

Yes, we're open! Today's hours are {%hours%}.

",
'closed' => "

Sorry, we're closed. Today's hours are {%hours%}.

",
'separator' => ' - ',
'join' => ' and ',
'format' => 'g:ia',
'overview_weekdays' => array('Mon ', ' Tue ', ' Wed ', ' Thu ', ' Fri: ', ' Sat ', ' Sun: '),
'hours' => "{%open%} {%separator%} {%closed%}"
);`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant