aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/time/calculations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb
index 867ac86617..0bc83af709 100644
--- a/activesupport/lib/active_support/core_ext/time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -221,12 +221,12 @@ module ActiveSupport #:nodoc:
# Convenience method which returns a new Time representing the time 1 day ago
def yesterday
- self.ago(1.day)
+ advance(:days => -1)
end
# Convenience method which returns a new Time representing the time 1 day since the instance time
def tomorrow
- self.since(1.day)
+ advance(:days => 1)
end
def plus_with_duration(other) #:nodoc: