Proper testing of dates