Sha256: a0d40dbe4c14ede7c065f73d86f6093d8c723d3c13f939b3f685bee4eeef271e
Contents?: true
Size: 379 Bytes
Versions: 22
Compression:
Stored size: 379 Bytes
Contents
require 'date' class DateTime # Converts self to a Ruby Date object; time portion is discarded def to_date ::Date.new(year, month, day) end unless method_defined?(:to_date) end class Numeric def minutes self * 60 end alias :minute :minutes def hours self * 3600 end alias :hour :hours def days self * 24.hours end alias :day :days end
Version data entries
22 entries across 22 versions & 1 rubygems