module RichUnits::Times::Numeric
Numeric
Times
¶ ↑
Public Instance Methods
after(time = ::Time.now)
click to toggle source
Calculates time after a given time. Default time is now. Reads best with argument: 10.minutes.after(time)
# File lib/richunits/times.rb, line 434 def after(time = ::Time.now) time + self end
before(time = ::Time.now)
click to toggle source
Calculates time before a given time. Default time is now. Reads best with arguments: 10.days.before( Time.now - 1.day )
# File lib/richunits/times.rb, line 426 def before(time = ::Time.now) time - self end