warn_transformer/transformers/tn.py
def transform_date(self, value: str) -> typing.Optional[str]:
        """Transform a raw date string into a date object.

        Args:
            value (str): The raw date string provided by the source

        Returns: A date object ready for consolidation. Or, if the date string is invalid, a None.
        """
        try:
            return super().transform_date(value)
        except Exception:
            value = value.strip().split(" and ")[0].strip()
            value = value.strip().split(" to ")[0].strip()
            value = value.strip().split(" through ")[0].strip()
            value = value.strip().split(" & ")[0].strip()
            return super().transform_date(value)
Transform a raw date string into a date object.

        Args:
            value (str): The raw date string provided by the source

        Returns: A date object ready for consolidation. Or, if the date string is invalid, a None.
        
Transform a raw date string into a date object.
Transform a raw date string into a date object .
def transform_date(self, value: str) -> typing.Optional[str]:
        try:
            return super().transform_date(value)
        except Exception:
            value = value.strip().split(" and ")[0].strip()
            value = value.strip().split(" to ")[0].strip()
            value = value.strip().split(" through ")[0].strip()
            value = value.strip().split(" & ")[0].strip()
            return super().transform_date(value)
def transform_date ( self , value : str ) -> typing . Optional [ str ] : try : return super ( ) . transform_date ( value ) except Exception : value = value . strip ( ) . split ( " and " ) [ 0 ] . strip ( ) value = value . strip ( ) . split ( " to " ) [ 0 ] . strip ( ) value = value . strip ( ) . split ( " through " ) [ 0 ] . strip ( ) value = value . strip ( ) . split ( " & " ) [ 0 ] . strip ( ) return super ( ) . transform_date ( value )
Transform a raw date string into a date object.
Transform a raw date string into a date object .
"""Transform a raw date string into a date object.

        Args:
            value (str): The raw date string provided by the source

        Returns: A date object ready for consolidation. Or, if the date string is invalid, a None.
        """
self
value
str
The raw date string provided by the source
The raw date string provided by the source