I have two dates which I need to compare, if one is past second. That means:
date1 := Date newDay: 10 month: 12 year: 2017
date2 := Date newDay: 1 month: 1 year: 2020
So in this case date2 is past date1, so I need this to be true.
But
date1 := Date newDay: 10 month: 12 year: 2017
date2 := Date newDay: 3 month: 7 year: 2015
should return false.
Anyone got hints? Appreciate!
I guess this depends on which dialect you are using, but ANSI standard already defines
<forDateAndTimewhich seems similar toDate. I tried your code in Pharo and Dolphin anddate1 < date2works just fine for your needs (even if Date instantiation in Dolphin is a little bit different).