Convert date regex to date before comparison. Closes #503.

Fixes #503.
Can you use toString() instead ?