def try_convert_to_date(self, word):
        """
        Tries to convert word to date(datetime) using search_date_formats
        Return None if word fits no one format
        """
        for frm in self.search_date_formats:
            try:
                return datetime.datetime.strptime(word, frm).date()
            except ValueError:
                pass
        return None
def try_convert_to_date(self, word):
        """
        Tries to convert word to date(datetime) using search_date_formats
        Return None if word fits no one format
        """
        for frm in self.search_date_formats:
            try:
                return datetime.datetime.strptime(word, frm).date()
            except ValueError:
                pass
        return None
def try_convert_to_date ( self , word ) : for frm in self . search_date_formats : try : return datetime . datetime . strptime ( word , frm ) . date ( ) except ValueError : pass return None
Tries to convert word to date(datetime) using search_date_formats
        Return None if word fits no one format
Tries to convert word to date ( datetime ) using search_date_formats Return None if word fits no one format