Compare dates as dates (not strings). Fixes #356