Use working_hours without monkey patching
masterIf you prefer not to modify core Ruby classes, you can use the WorkingHours::Duration class and the WorkingHours module directly. This is safer for libraries or projects that want to avoid side effects.
require 'working_hours/module'
# Use Duration objects
WorkingHours::Duration.new(1, :days).from_now
WorkingHours::Duration.new(8, :days).since(Date.new(2014, 12, 31))
WorkingHours::Duration.new(4, :hours).until(Time.utc(2014, 8, 4, 8, 32))
# Use WorkingHours module methods
WorkingHours.working_days_between(friday, monday)
WorkingHours.working_time_between(from, to)
WorkingHours.working_day?(Date.new(2014, 12, 28))
WorkingHours.in_working_hours?(Time.utc(2014, 8, 4, 7, 16))