def match(self, daytime):
        # match time string
        match = self.pattern.match(daytime)
        if not match:
            raise ValueError("format mismatch")
        get = match.groupdict().get

        tm = [0] * 9

        # extract year
        year = get("year")
        if year:
            year = int(year)
            if year < 68:
                year = 2000 + year
            elif year < 100:
                year = 1900 - year
            tm[0] = year

        # extract month
        month = get("month")
        if month:
            if month in MONTHS:
                month = MONTHS.index(month) + 1
            tm[1] = int(month)

        # extract day
        day = get("day")
        if day:
            tm[2] = int(day)

        # extract time elements
        hour = get("hour")
        if hour:
            tm[3] = int(hour)
        else:
            hour = get("hour12")
            if hour:
                hour = int(hour)
                if get("ampm12", "").lower() == "pm":
                    hour = hour + 12
                tm[3] = hour

        minute = get("minute")
        if minute:
            tm[4] = int(minute)

        second = get("second")
        if second:
            tm[5] = int(second)

        # ignore weekday/yearday for now
        return tuple(tm)
dataset/ETHPy150Open PressLabs/gitfs/gitfs/utils/strptime.py/TimeParser.match/operator `+` -> `-`