diff options
author | Michael Koziarski <michael@koziarski.com> | 2006-03-09 07:37:51 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2006-03-09 07:37:51 +0000 |
commit | 43398433e98f9f6a9666f53272a790035be629b4 (patch) | |
tree | c8c7eb0970af608251f996964290218ce27499d3 /activesupport/lib/active_support/core_ext | |
parent | 5568d20b2e0fdd0695d66a7406f926fc5c5c4135 (diff) | |
download | rails-43398433e98f9f6a9666f53272a790035be629b4.tar.gz rails-43398433e98f9f6a9666f53272a790035be629b4.tar.bz2 rails-43398433e98f9f6a9666f53272a790035be629b4.zip |
Added a note to the documentation for the Date related Numeric extensions to indicate that they're
approximations and shouldn't be used for critical calculations. [Koz]. Closes #4148. References #4146
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/numeric/time.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb index de726281b8..a69a6c5f64 100644 --- a/activesupport/lib/active_support/core_ext/numeric/time.rb +++ b/activesupport/lib/active_support/core_ext/numeric/time.rb @@ -1,7 +1,12 @@ module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Numeric #:nodoc: - # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years + # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. + # + # Some of these methods are approximations, Ruby's core + # Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and + # Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision + # date and time arithmetic module Time def minutes self * 60 |