Sha256: ff4b67d58a809241ddb1af12e7b3c266ea55aa9ff5aa4899e5043ea638a10be7

Contents?: true

Size: 269 Bytes

Versions: 22

Compression:

Stored size: 269 Bytes

Contents

# Mixin for working_days
class Integer
  # Returns a date of the number of working days since a given date
  def working_days_since(date)
    times do
      date = date.next
      date = date.next while date.public_holiday? || !date.weekday?
    end
    date
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ndr_support-5.10.4 lib/ndr_support/integer/working_days.rb
ndr_support-5.10.3 lib/ndr_support/integer/working_days.rb
ndr_support-5.10.2 lib/ndr_support/integer/working_days.rb
ndr_support-5.10.1 lib/ndr_support/integer/working_days.rb
ndr_support-5.10.0 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.7 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.6 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.5 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.4 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.3 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.2 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.1 lib/ndr_support/integer/working_days.rb
ndr_support-5.9.0 lib/ndr_support/integer/working_days.rb
ndr_support-5.8.4 lib/ndr_support/integer/working_days.rb
ndr_support-5.8.3 lib/ndr_support/integer/working_days.rb
ndr_support-5.8.2 lib/ndr_support/integer/working_days.rb
ndr_support-5.8.1 lib/ndr_support/integer/working_days.rb
ndr_support-5.8.0 lib/ndr_support/integer/working_days.rb
ndr_support-5.7.1 lib/ndr_support/integer/working_days.rb
ndr_support-5.7.0 lib/ndr_support/integer/working_days.rb