Module ActiveSupport::CoreExtensions::Time::Calculations Version 1.2.4
[ 0 Notes ] [ History ]
Enables the use of time calculations within Time itself
Add New Note Files this module is defined inFile: /Users/nshb/svn/svn.inimit.com/railsmanual.com/www/trunk/src/rails-1.2.4/activesupport/lib/active_support/core_ext/time/calculations.rbPublic Instance Methods
advance (options)
Uses Date to provide precise Time calculations for years, months, and days. The options parameter takes a hash with any of these keys: :months, :days, :years.
[ Source ] [ Add New Note ]ago (seconds)
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!
[ Source ] [ Add New Note ]at_beginning_of_day ()
Alias for #beginning_of_day
[ Source ] [ Add New Note ]at_beginning_of_month ()
Alias for #beginning_of_month
[ Source ] [ Add New Note ]at_beginning_of_quarter ()
Alias for #beginning_of_quarter
[ Source ] [ Add New Note ]at_beginning_of_week ()
Alias for #beginning_of_week
[ Source ] [ Add New Note ]at_beginning_of_year ()
Alias for #beginning_of_year
[ Source ] [ Add New Note ]