add date compare utility and test.