from datetime import datetime
from datetime import timedelta


def round_month_up(origin_date):
    """
    Takes a datetime object and rounds up to the nearest month.
    E.g. 2/14/2013 becomes 3/1/2013
    :param datetime.datetime origin_date:
    :return datetime.datetime:
    """
    day = origin_date.day
    month = origin_date.month
    year = origin_date.year
    if origin_date.month == 12:
        delta = datetime(year + 1, 1, day) - origin_date
    else:
        delta = datetime(year, month + 1, day) - origin_date
    return origin_date + delta - timedelta(days=day - 1)