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

Get closest closing time #24

Open
saymon92 opened this issue Jul 28, 2017 · 4 comments
Open

Get closest closing time #24

saymon92 opened this issue Jul 28, 2017 · 4 comments
Labels

Comments

@saymon92
Copy link

saymon92 commented Jul 28, 2017

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

@florianv
Copy link
Owner

florianv commented Sep 10, 2017

Hey,

Maybe you can maybe do this ?

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

@vinespie
Copy link

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

@agencefacton
Copy link

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
Copy link

?!

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

No branches or pull requests

4 participants