Comparing dates

Comparing date objects directly doesn't work