Sha256: d4c0c5acab56f2f37ad5cc20db4487aea5882f5b31780f68ad25a936b2d9bfea
Contents?: true
Size: 381 Bytes
Versions: 4
Compression:
Stored size: 381 Bytes
Contents
p 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fossil-0.5.3 | lib/date_extentions.rb |
fossil-0.5.2 | lib/date_extentions.rb |
fossil-0.5.1 | lib/date_extentions.rb |
fossil-0.5.0 | lib/date_extentions.rb |