business icon indicating copy to clipboard operation
business copied to clipboard

Get closest closing time

Open saymon92 opened this issue 7 years ago • 4 comments

Hi. Thanks for your work.

Is possible to get the closest closing time from a given date? For example Days::MONDAY, [['08:00', '13:00'], ['14:00', '18:30']] i need a function like $business->closestClosing(new \DateTime('2017-07-24 10:00')); return '13:00'.

thanks

saymon92 avatar Jul 28 '17 08:07 saymon92

Hey,

Maybe you can maybe do this ?

$lastDate = $business->closest(new \DateTime('2017-07-24 10:00'), Business::CLOSEST_LAST);

florianv avatar Sep 10 '17 06:09 florianv

Hi @florianv ,

Business::CLOSEST_LAST mode parameter do not work with closest method. In the cas above, return date "2017-07-24 10:00:00.000000" instead of "2017-07-24 13:00:00.000000"

Thanks

vinespie avatar Jan 24 '18 10:01 vinespie

No response for this problem, I have the same question...

I have the open days and special days, the holidays by day, but I want to closed the day for 2 hours, it's not possible actually... ?!?!

Please help.

agencefacton avatar Dec 10 '18 09:12 agencefacton

?!

agencefacton avatar Feb 14 '19 10:02 agencefacton