def parse_date(self, s):
        date = None
        parse_date_formats = global_settings("parse_date_formats", [])
        for fmt in parse_date_formats:
            try:
                date = datetime.datetime.strptime(s, fmt)
            except __HOLE__:
                pass
        return date
dataset/ETHPy150Open duydao/Text-Pastry/text_pastry.py/TextPastryDateRangeCommand.parse_date