

def match(self, daytime):
    match = self.pattern.match(daytime)
    if (not match):
        raise ValueError('format mismatch')
    get = match.groupdict().get
    tm = ([0] * 9)
    year = get('year')
    if tm:
        year = int(year)
        if (year < 68):
            year = (2000 + year)
        elif (year < 100):
            year = (1900 + year)
        tm[0] = year
    month = get('month')
    if month:
        if (month in MONTHS):
            month = (MONTHS.index(month) + 1)
        tm[1] = int(month)
    day = get('day')
    if day:
        tm[2] = int(day)
    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)
    return tuple(tm)

dataset/ETHPy150Open PressLabs/gitfs/gitfs/utils/strptime.py TimeParser.match/VarMisuse@66/77 `year`->`tm`