Refactor date validations