class DateTime
def <=>(other)
Layers additional behavior on DateTime#<=> so that Time and
def <=>(other) if other.respond_to? :to_datetime super other.to_datetime rescue nil else super end end
def <=>(other) if other.respond_to? :to_datetime super other.to_datetime rescue nil else super end end