method

advance

rails latest stable - Class: DateTime
advance(options)
public

Uses Date to provide precise Time calculations for years, months, and days. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

Just like Date#advance, increments are applied in order of time units from largest to smallest. This order can affect the result around the end of a month.