title: How to create a date range until some date inclusive with python dateutils?
body: <p>I'm trying to get a list of months in the given range. Specifically, given the range <code>2015-12-31 - 2016-01-01</code>, I want to get the list <code>2015-12</code> and <code>2016-01</code>.</p>
  
  <p>I'm using dateutil's rrule, but the <code>until</code> parameter isn't really helping since it seems to be looking for complete months. </p>
  
  <p>E.g.:</p>
  
  <pre><code>from dateutil.relativedelta import relativedelta
  from dateutil.rrule import rrule, MONTHLY
  
  list(rrule(MONTHLY, dtstart=datetime(2015, 12, 31), until=datetime(2016,01,01)))
  </code></pre>
  
  <p>This only returns <code>[datetime.datetime(2015, 12, 31, 0, 0)]</code>, not <code>[datetime.datetime(2015, 12, 31, 0, 0), datetime.datetime(2016, 01, 01, 0, 0)]</code></p>
  
  <p>Likewise, I want the same output for any start day in December, and any end day in January. That's to say, I only care about the fact that the months are <code>2015-12</code> and <code>2016-01</code>. The day part is not important for me, but I only want a single <code>datetime</code> per month (a maximum of 2 for these inputs, with any value for the <code>day</code> component).</p>
  
  <p>Is there a simple solution, or will I have to increment DAILY and build my own set of months? </p>