After taking a look at the DefinitionParser@194 expect the date object passed into the closure to be a Carbon instance, but after source diving the new implementation in spatie/opening-hours a DateTime object is what is being passed into the filters.
I was going to submit a PR, but I'm not sure the best way to go around fixing this as I don't see an easy way to parse out the holidays to check the DateTime object. Appreciate your time and help!
Using:
Laravel 7.28.1 (schedule enabled to \Illuminate\Support\Carbon)
PHP 7.4.9
Hey there,
First off - thank you so much for package, it really is awesome!
Issue
When attempting to check if a date is open on a string formatted date e.g.
and
holidaysAreClosed
is set to true it produces the following error:Example
Here is an example in the live editor
Trying to solve
After taking a look at the DefinitionParser@194 expect the date object passed into the closure to be a Carbon instance, but after source diving the new implementation in spatie/opening-hours a DateTime object is what is being passed into the filters.
I was going to submit a PR, but I'm not sure the best way to go around fixing this as I don't see an easy way to parse out the holidays to check the DateTime object. Appreciate your time and help!
Using:
Laravel 7.28.1 (schedule enabled to \Illuminate\Support\Carbon) PHP 7.4.9