Methods
Public Instance methods
Returns Time.zone.today when config.time_zone is set, otherwise just returns Date.today.
[ show source ]
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 30
30: def current
31: ::Time.zone_default ? ::Time.zone.today : ::Date.today
32: end
Returns a new Date representing the date 1 day after today (i.e. tomorrow‘s date).
[ show source ]
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 25
25: def tomorrow
26: ::Date.today.tomorrow
27: end
Returns a new Date representing the date 1 day ago (i.e. yesterday‘s date).
[ show source ]
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 20
20: def yesterday
21: ::Date.today.yesterday
22: end