def METHOD_NAME(yearList):
    current = None
    last = None
    result = []
    for yStr in yearList:
        y = int(yStr)
        if last is None:
            current = y
            last = y
            continue
        if y == last + 1:
            last = y
            continue
        if last == current:
            result.append("%i" % last)
        else:
            result.append("%i-%i" % (current, last))
        current = y
        last = y
    if not last is None:
        if last == current:
            result.append("%i" % last)
        else:
            result.append("%i-%i" % (current, last))
    return ", ".join(result)