Permalink
Browse files

let Date.yesterday and Date.tomorrow be based on Date.current rather …

…than Date.today
  • Loading branch information...
1 parent 1b898cc commit 7aaabea5175be4b01697684e7573b422629206e6 @fxn fxn committed May 1, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -7,12 +7,12 @@ class Date
class << self
# Returns a new Date representing the date 1 day ago (i.e. yesterday's date).
def yesterday
- ::Date.today.yesterday
+ ::Date.current.yesterday
end
# Returns a new Date representing the date 1 day after today (i.e. tomorrow's date).
def tomorrow
- ::Date.today.tomorrow
+ ::Date.current.tomorrow
end
# Returns Time.zone.today when config.time_zone is set, otherwise just returns Date.today.

0 comments on commit 7aaabea

Please sign in to comment.