We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I create opening hours for MONDAY and TUESDAY that are identical.
$open_with_overflow and $open_without_overflow
$open_with_overflow
$open_without_overflow
I create $the_time that is set to Tuesday the 4th of June 2019.
$the_time
//Tuesday 4th of June 2019, 11.35 am $the_time = new DateTime('2019-06-04 11:35:00'); $open_with_overflow = OpeningHours::create([ 'overflow' => true, 'monday' => ['11:00-18:00'], 'tuesday' => ['13:37-15:37'], ] ); $open_without_overflow = OpeningHours::create([ 'overflow' => false, 'monday' => ['11:00-18:00'], 'tuesday' => ['13:37-15:37'], ] ); var_dump( $open_with_overflow->isOpenAt($the_time), $open_without_overflow->isOpenAt($the_time) );
These two isOpen calls should both result in the same anser, but the output from the above is:
bool(true) bool(false)
If i change the closing hours on monday to 11.34 they both return false.
It seems like the overflow automatically assumes that the previous days closing time applies to the current date.
This should only be true if the previous days closing time happens BEFORE the current days closing time.
The text was updated successfully, but these errors were encountered:
It's indeed a bug, overflow should do nothing until a range has an end smaller than its start.
overflow
Sorry, something went wrong.
8895a73
Merge pull request #112 from kylekatarnls/feature/88-opening-hours-ac…
1487462
…ross-midnight Fix #111 overflow with simple ranges and add tests
Thanks, patch released 2.2.1.
kylekatarnls
No branches or pull requests
I create opening hours for MONDAY and TUESDAY that are identical.
$open_with_overflow
and$open_without_overflow
I create
$the_time
that is set to Tuesday the 4th of June 2019.These two isOpen calls should both result in the same anser, but the output from the above is:
If i change the closing hours on monday to 11.34 they both return false.
It seems like the overflow automatically assumes that the previous days closing time applies to the current date.
This should only be true if the previous days closing time happens BEFORE the current days closing time.
The text was updated successfully, but these errors were encountered: