class Integer

Public Instance Methods

days_ago(format = '%D') click to toggle source
# File lib/data_magic/core_ext/integer.rb, line 9
def days_ago(format = '%D')
  the_day = Date.today - self
  the_day.strftime(format)
end
days_from_today(format = '%D') click to toggle source
# File lib/data_magic/core_ext/integer.rb, line 4
def days_from_today(format = '%D')
  the_day = Date.today + self
  the_day.strftime(format)
end