class WB::Day
Public Class Methods
working?()
click to toggle source
# 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