Sha256: 90cf084c63eef134dd5654f7186b5d7428c992c2c1b5e0920a7d11e46aaebb4e

Contents?: true

Size: 351 Bytes

Versions: 3

Compression:

Stored size: 351 Bytes

Contents

module TimeClock
  module BusinessTimeUntil
    def business_seconds_until(time)
      TimeClock::Comparison.new(self, time).seconds.to_i
    end

    def business_minutes_until(time)
      (business_seconds_until(time).to_f / 60).ceil
    end

    def business_hours_until(time)
      (business_seconds_until(time).to_f / 3600).ceil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
time_clock-0.0.9 lib/time_clock/business_time_until.rb
time_clock-0.0.8 lib/time_clock/business_time_until.rb
time_clock-0.0.5 lib/time_clock/business_time_until.rb