instance method
<=>
Ruby on Rails 7.1.6
Since v2.2.3Signature
<=>(zone)
Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.
Parameters
-
zonereq
Source
# File activesupport/lib/active_support/values/time_zone.rb, line 335
def <=>(zone)
return unless zone.respond_to? :utc_offset
result = (utc_offset <=> zone.utc_offset)
result = (name <=> zone.name) if result == 0
result
end
Defined in activesupport/lib/active_support/values/time_zone.rb line 335
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeZone