fixed dateCheck bug and modified/expanded unit tests