diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/numeric/time.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb index 43c0425b00..de726281b8 100644 --- a/activesupport/lib/active_support/core_ext/numeric/time.rb +++ b/activesupport/lib/active_support/core_ext/numeric/time.rb @@ -32,9 +32,9 @@ module ActiveSupport #:nodoc: self * 30.days end alias :month :months - + def years - self * 365.days + (self * 365.25.days).to_i end alias :year :years |