

def add_month(year, month, delta):
    '\n    Helper function which adds `delta` months to current `(year, month)` tuple\n    and returns a new valid tuple `(year, month)`\n    '
    (year, month) = divmod((((year * 12) + month) + delta), 12)
    if (month == 0):
        month = 12
        year = (year - 1)
    return (year, month)

dataset/ETHPy150Open caxap/redis-moment/moment/utils.py add_month/original