Re-implement date comparison with Rails date helpers

I'm not sure whether there's some subtlety that I've missed, but I'm unable to see anything wrong with this suggested tweak. Needs a second pair of eyes though.

Not associated with any story, I just spotted it…