Sha256: f93c1f3fe1359668d9bfa4ac6aa043b10ae5491c748e2fb0708f4be9927497f9

Contents?: true

Size: 304 Bytes

Versions: 1

Compression:

Stored size: 304 Bytes

Contents

class Time

  def business_seconds_until(time)
    TimeClock::Comparison.new(self.to_time, 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
time_clock-0.0.4 lib/time_clock/core_ext/time.rb