aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/numeric
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-16 03:04:00 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-16 03:04:00 +0000
commitc3c69d90626dd5ac16231b1d53615547df678f76 (patch)
treebe5e846a49808ed98be29a7c19f0b505637873e5 /activesupport/lib/active_support/core_ext/numeric
parentcee92312cfe6d573945b341e2de5d4ae7268bfcd (diff)
downloadrails-c3c69d90626dd5ac16231b1d53615547df678f76.tar.gz
rails-c3c69d90626dd5ac16231b1d53615547df678f76.tar.bz2
rails-c3c69d90626dd5ac16231b1d53615547df678f76.zip
Added Time#advance to do precise time time calculations for cases where a month being approximated to 30 days won't do (closes #1860) [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/numeric')
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/time.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb
index a69a6c5f64..b4954e943f 100644
--- a/activesupport/lib/active_support/core_ext/numeric/time.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/time.rb
@@ -2,6 +2,9 @@ module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Numeric #:nodoc:
# Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years.
+ #
+ # If you need precise date calculations that doesn't just treat months as 30 days, then have
+ # a look at Time#advance.
#
# Some of these methods are approximations, Ruby's core
# Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and