title: How to iterate over a timespan after days, hours, weeks and months?
body: <p>How do I iterate over a timespan after days, hours, weeks or months?</p>
  
  <p>Something like:</p>
  
  <pre><code>for date in foo(from_date, to_date, delta=HOURS):
      print date
  </code></pre>
  
  <p>Where foo is a function, returning an iterator. I've been looking at the calendar module, but that only works for one specific year or month, not between dates.</p>