Method: TimeCalc::Types#compare

Defined in:
lib/time_calc/types.rb

#compare(v1, v2) ⇒ Object



24
25
26
# File 'lib/time_calc/types.rb', line 24

def compare(v1, v2)
  compatible?(v1, v2) ? v1 <=> v2 : v1.to_time <=> v2.to_time
end