Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…than Date.today
  • Loading branch information...
commit 7aaabea5175be4b01697684e7573b422629206e6 1 parent 1b898cc
@fxn fxn authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/date/calculations.rb
View
4 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.
Please sign in to comment.
Something went wrong with that request. Please try again.