def _str_to_datetime(self, str_value):
        """Parses a `YYYY-MM-DD` string into a datetime object."""
        try:
            ldt = [int(f) for f in str_value.split('-')]
            dt = datetime.datetime(*ldt)
        except (ValueError, TypeError):
            return None
        return dt
Parses a `YYYY-MM-DD` string into a datetime object.