def num_months_between(start, end):
    """
    Returns number  of months between two dates.

    Ignores day of month.
    """
    m1 = start.year * 12 + (start.month - 1)
    m2 = end.year * 12 + (end.month - 1)
    return m2 - m1