def expiry_date(self) -> bool: """Return True if the expiry date is validated, False otherwise.""" ok = False try: # TODO: Make comment about self._expiry_date_check (if check_periods == True) ok = False if not self._expiry_date_check else bool(check.date(self._expiry_date)) except ValueError: pass finally: return self._report("expiry date", ok)
def birth_date(self) -> bool: """Return True is the birth date is validated, False otherwise.""" ok = False try: # TODO: Make comment about self._birth_date_check (if check_periods == True) ok = False if not self._birth_date_check else bool(check.date(self._birth_date)) except ValueError: pass finally: return self.report.add("birth date", ok)