add date compare fn