lib/its_business_time/time_extensions.rb
# True if this time is on a workday (between 00:00:00 and 23:59:59), even if
# this time falls outside of normal business hours.
True if this time is on a workday (between 00:00:00 and 23:59:59), even if
this time falls outside of normal business hours.
True if this time is on a workday ( between 00 : 00 : 00 and 23 : 59 : 59 ) even if this time falls outside of normal business hours .
def next_beginning_of_workday
      return tz_adjusted.beginning_of_workday if before_business_hours?
      next_business_day = after_business_hours? ? tz_adjusted.clone + 1.day : tz_adjusted.clone
      while !next_business_day.workday? do
        next_business_day += 1.day
      end
      return next_business_day.beginning_of_workday
    end
def next_beginning_of_workday return tz_adjusted . beginning_of_workday if before_business_hours? next_business_day = after_business_hours? ? tz_adjusted . clone + 1 . day : tz_adjusted . clone while ! next_business_day . workday? do next_business_day += 1 . day end return next_business_day . beginning_of_workday end
True if this time is on a workday (between 00:00:00 and 23:59:59), even if
this time falls outside of normal business hours.
True if this time is on a workday ( between 00 : 00 : 00 and 23 : 59 : 59 ) even if this time falls outside of normal business hours .