Module: Mack::Facets::DateTime

Defined in:
lib/mack-facets/extensions/date_time.rb

Instance Method Summary collapse

Instance Method Details

#add_seconds(secs) ⇒ Object



7
8
9
10
# File 'lib/mack-facets/extensions/date_time.rb', line 7

def add_seconds(secs)
  # self + (secs / 1.day.to_i)
  self.since(secs)
end

#minus_seconds(secs) ⇒ Object

Subtracts seconds and returns a new DateTime object



13
14
15
16
# File 'lib/mack-facets/extensions/date_time.rb', line 13

def minus_seconds(secs)
  # self - (secs / 1.day.to_i)
  self.ago(secs)
end