Ruby | Time <=> method
The is an inbuilt method in Ruby returns -1, 0, 1 depending on whether time is less than, equal to, or greater than other time. It is returns nil if two times are incomparable. Syntax: time <=> otherTime Parameters: The function accepts no parameter Return Value: It returns -1, 0, 1 depending