title: How to increment datetime by custom months in python without using library
body: <p>I need to increment the month of a datetime value</p>
  
  <pre><code>next_month = datetime.datetime(mydate.year, mydate.month+1, 1)
  </code></pre>
  
  <p>when the month is 12, it becomes 13 and raises error "month must be in 1..12". (I expected the year would increment)</p>
  
  <p>I wanted to use timedelta, but it doesn't take month argument.
  There is <a href="http://labix.org/python-dateutil" rel="noreferrer">relativedelta</a> python package, but i don't want to install it just only for this.
  Also there is a solution using <a href="http://pypi.python.org/pypi/timelib/0.2" rel="noreferrer">strtotime</a>.</p>
  
  <pre><code>time = strtotime(str(mydate));
  next_month = date("Y-m-d", strtotime("+1 month", time));
  </code></pre>
  
  <p>I don't want to convert from datetime to str then to time, and then to datetime; therefore, it's still a library too</p>
  
  <p>Does anyone have any good and <strong>simple</strong> solution just like using timedelta?</p>