aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-01-17 06:28:57 +0000
committerRick Olson <technoweenie@gmail.com>2007-01-17 06:28:57 +0000
commit4733182e566c87f5f351340f759ac84a265eb151 (patch)
tree33b2ffeb9e6d460e2fd09f7e455ee37d0992b064 /actionpack/lib/action_view/helpers
parent1ff84503b4a6f1da1cee125d5f872d760b159ba2 (diff)
downloadrails-4733182e566c87f5f351340f759ac84a265eb151.tar.gz
rails-4733182e566c87f5f351340f759ac84a265eb151.tar.bz2
rails-4733182e566c87f5f351340f759ac84a265eb151.zip
Fix #distance_of_time_in_words to report accurately against the Duration class. #7114 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 19dc90caa3..d33a576214 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -69,9 +69,9 @@ module ActionView
when 1440..2879 then '1 day'
when 2880..43199 then "#{(distance_in_minutes / 1440).round} days"
when 43200..86399 then 'about 1 month'
- when 86400..525959 then "#{(distance_in_minutes / 43200).round} months"
- when 525960..1051919 then 'about 1 year'
- else "over #{(distance_in_minutes / 525960).round} years"
+ when 86400..525599 then "#{(distance_in_minutes / 43200).round} months"
+ when 525600..1051199 then 'about 1 year'
+ else "over #{(distance_in_minutes / 525600).round} years"
end
end