aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date/calculations.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-07 18:39:03 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-07 18:39:03 -0700
commit4817bf94d135c44ddfae1a30acb15de989e3c86c (patch)
treed64f3a7ffb205d53ae4bbfe37ad0453e99148f36 /activesupport/lib/active_support/core_ext/date/calculations.rb
parent49ed45213607ed6ce7e6c13c319bf55f916a0ac4 (diff)
downloadrails-4817bf94d135c44ddfae1a30acb15de989e3c86c.tar.gz
rails-4817bf94d135c44ddfae1a30acb15de989e3c86c.tar.bz2
rails-4817bf94d135c44ddfae1a30acb15de989e3c86c.zip
Check for date/time methods that moved upstream in 1.9
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date/calculations.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/date/calculations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb
index 04a32edefd..1fe4ffb8e1 100644
--- a/activesupport/lib/active_support/core_ext/date/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -132,7 +132,7 @@ class Date
# Short-hand for years_since(1)
def next_year
years_since(1)
- end
+ end unless method_defined?(:next_year)
# Short-hand for months_ago(1)
def last_month
@@ -142,7 +142,7 @@ class Date
# Short-hand for months_since(1)
def next_month
months_since(1)
- end
+ end unless method_defined?(:next_month)
# Returns a new Date/DateTime representing the "start" of this week (i.e, Monday; DateTime objects will have time set to 0:00)
def beginning_of_week