Better date comparison

Old code was a bit flaky. Works just for days: if you need months hours and minutes, a plugin might be better suited

Signed-off-by: Jérôme Coupé <jercoupe@gmail.com>