Class: WB::Day
- Inherits:
-
Object
- Object
- WB::Day
- Defined in:
- lib/wb/day.rb
Class Method Summary collapse
Class Method Details
.working? ⇒ Boolean
5 6 7 8 9 10 11 12 13 |
# File 'lib/wb/day.rb', line 5 def self.working? now = Time.now date = now.strftime("%Y-%m-%d") from, to = WB.config.working_hours start_time = TimeUtils.get_beginning_of(from, within: date) end_time = TimeUtils.get_end_of(to, within: date) now.between?(start_time, end_time) end |