Compare dates correctly.

Closes #11