instance method
today
Ruby on Rails edge
Signature
today()
Returns the current date in this time zone.
Source
# File activesupport/lib/active_support/values/time_zone.rb, line 598
def today
time = time_now.getutc
if utc?
time.to_date
else
time.getlocal(tzinfo.period_for(time).observed_utc_offset).to_date
end
end
Defined in activesupport/lib/active_support/values/time_zone.rb line 598
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeZone