Comments (2)
Hey,
your Time.zone.now.in_working_hours?
seems to be outside of the with_config
block
from working_hours.
If you want to set the working hours globally, i.e. not just within a block, as shown in the README you can use:
WorkingHours::Config.working_hours = { mon: {'09:00' => '12:00', '13:00' => '14:00'} }
Time.zone.now.in_working_hours? # This now uses the above config
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
- 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
- This is more like a question for dynamic entering HOT 2
- 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
- Problems using with JRuby 1.7.15 HOT 6
- 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.