Date validator and tests