Module | ActiveSupport::CoreExtensions::Time::Calculations |
In: |
lib/active_support/core_ext/time/calculations.rb
|
Enables the use of time calculations within Time itself
Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension Do not use this method in combination with x.months, use months_ago instead!
Returns a new Time where one or more of the elements have been changed according to the options parameter. The time options (hour, minute, sec, usec) reset cascadingly, so if only the hour is passed, then minute, sec, and usec is set to 0. If the hour and minute is passed, then sec and usec is set to 0.
Returns a new Time representing the time a number of seconds since the instance time, this is basically a wrapper around
the Numeric extension. Do not use this method in combination with x.months, use months_since instead!