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

Is it possible to create multiple objects with different worktimes? #118

Closed
giovannibonetti opened this issue Jul 9, 2015 · 2 comments
Closed

Comments

@giovannibonetti
Copy link

Hi! First of all, great project!
I just stumbled upon it, and I was wondering if it is possible to create multiple instances of the base class with different business hours.
Something like this:

bt = BusinessTime.new(work_hours: {mon: ["9:00","17:00"], tue: ["10:00","15:00"]})
friday = Date.parse("December 24, 2010")
monday = Date.parse("December 27, 2010")
bt.business_days_until(friday, monday)

My use case is that in my startup we manage beauty salons which have many different opening times, with professionals that may have different working hours.

@craiglittle
Copy link

Hey, @giovannibonetti!

@bokmann has mentioned in other issues that he's not particularly impelled to add this feature as it's not useful for his purposes. However, it is a feature we needed at our company, so we added it to our own business_time-like gem called biz. Check out the README for details on how to configure; it's very similar to business_time. Feel free to ping me over there if you run into any issues!

@giovannibonetti
Copy link
Author

Thanks, @craiglittle!

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

2 participants