class Integer
Public Instance Methods
days_ago(format = '%D')
click to toggle source
# File lib/data_builder/core_ext/integer.rb, line 7 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_builder/core_ext/integer.rb, line 2 def days_from_today(format = '%D') the_day = Date.today + self the_day.strftime(format) end