instance method
dst?
Ruby on Rails 4.2.9
Since v2.2.3Signature
dst?()
Returns true if the current time is within Daylight Savings Time for the specified time zone.
Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' Time.zone.parse("2012-5-30").dst? # => true Time.zone.parse("2012-11-30").dst? # => false
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 90
def dst?
period.dst?
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 90
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone