Comments (2)
Have you looked at the with_config
method?
WorkingHours::Config.with_config(working_hours: {mon:{'09:00' => '18:00'}}, holidays: [], time_zone: 'Paris') do
# Intense calculations
end
You should be able to store your config in a database and wrap your code with this to use the latest available config, in an around_action
for example of you're using rails.
from working_hours.
Thanks a bunch
from working_hours.
Related Issues (20)
- The inverse of Holidays HOT 5
- Global configuration at startup not possible currently HOT 11
- Is not compatible with JRuby 1.7.9 HOT 2
- Find windows in working time... HOT 3
- Advancing out of Daylight Savings Time HOT 3
- WorkingHours.return_to_working_time() doesn't pass `.in_working_hours?` HOT 11
- Thread Safety HOT 2
- about working day HOT 4
- Go back to opening time HOT 3
- How to do that specific day to change working hours when I calculate time ? HOT 3
- WorkingHours.in_working_hours?(Time.zone.now) not working on heroku ? HOT 2
- 1.working.days.from_now if Date.current is holiday HOT 5
- Keep getting NoMethodError for method โto_localโ when trying to call .in_working_hours? HOT 1
- 0.5sec precision issue caused by excessive rounding HOT 1
- Support for time shifts? HOT 1
- ruby 3 gives raises error wrong number of arguments (given 1, expected 0) on with_config HOT 1
- Inconsistency with business_time gem HOT 3
- Support recurring holidays
- Add block syntax for configuration HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from working_hours.