Sha256: 18f1afee0b503e61b6eba7d2793e89d690bbedab278193fc146d07fbd9d67acf

Contents?: true

Size: 270 Bytes

Versions: 4

Compression:

Stored size: 270 Bytes

Contents

require 'chronic'
require 'ruby-duration'

module TimeDistribution
  module TimeRefinement
    refine Time do
      def count_forward_to(time)
        (time - self) + if self > time
          24 * 60 * 60
        else
          0
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
time_distribution-2.3.1 lib/time_distribution/time.rb
time_distribution-2.3.0 lib/time_distribution/time.rb
time_distribution-2.2.0 lib/time_distribution/time.rb
time_distribution-2.1.3 lib/time_distribution/time.rb