![]() |
Date#<=> is a Date class method which compares two date objects.
Example #1 :
Output : Date a : 2019-01-01 Date b : 2001-04-04 Date c : 2019-01-12 Date a form : -1 Date b form : 1 Date c form : 1 Example #2 :
Output : Date a : 2019-01-01 Date b : 2019-12-03 Date c : 2019-02-02 Date a form : -1 Date b form : 1 Date c form : 1 |
Reffered: https://www.geeksforgeeks.org
Ruby |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 7 |