Sha256: 4a29aee081d9b3fa2fcf0d59ff1ff53d927e6ca37633156744b84e9dfb980cd9
Contents?: true
Size: 387 Bytes
Versions: 5
Compression:
Stored size: 387 Bytes
Contents
class Time def last_month (self.to_datetime << 1).to_time end def next_month (self.to_datetime >> 1).to_time end def tomorrow (self.to_datetime + 1).to_time end def yesterday (self.to_datetime - 1).to_time end end class Integer def weeks self.days * 7 end alias :week :weeks def days self * 24 * 60 * 60 end alias :day :days end
Version data entries
5 entries across 5 versions & 1 rubygems