(ref_date)
return type(ref_date)(year, month, 1)
Given a datetime, return a datetime that is the first of the following
    month.
Given a datetime, return a datetime that is the first of the following
    month.
Given a datetime return a datetime that is the first of the following month .
def first_of_next_month(ref_date):
    """
    Given a datetime, return a datetime that is the first of the following
    month.
    """
    year, month = add_months(ref_date.year, ref_date.month, 1)
    return type(ref_date)(year, month, 1)
def first_of_next_month ( ref_date ) : year , month = add_months ( ref_date . year , ref_date . month , 1 ) return type ( ref_date ) ( year , month , 1 )