title: Looking for *existing* Python module for determining fiscal months
body: <p>I'm in calendar hell, and I'm hoping there exists a Python module out there that does what I want.</p>
  
  <p>I'm making a Python web app that deals with subscriptions. It's conceptually similar to a cell phone plan: You start your subscription on a certain date (say <code>1.13.2011</code>), and for every billing month you have a bunch of "sessions" (phone calls), that you would be charged for.</p>
  
  <p>We need to:</p>
  
  <ol>
  <li>Know under which billing month each session falls.</li>
  <li>Know the start time and end time of each billing month.</li>
  </ol>
  
  <p>For example, if you signed up on <code>1.13.2011</code>, and made a phone call on <code>1.20.2011</code>, it would count on your first billing month. Same for a phone call on <code>2.10.2011</code>. But if you were to make a phone call on <code>2.15.2011</code>, it will count on your second billing month.</p>
  
  <p>Regarding start and end dates: If today is <code>2.15.2011</code>, then the start date of the current month is <code>2.13.2011</code> and its end date is <code>3.13.2011</code>.</p>
  
  <p>You may be thinking this is not so complicated, but then you have to consider that months have different lengths. The rule for handling this is that if your subscription started on the 30th of whatever month, its cutoff dates on each month would be <code>min(30, n_days_in_that_month)</code>. This goes for 29, 30 and 31 as well.</p>
  
  <hr>
  
  <p>I tried coding this, but it got too complex. What I'm looking for is a ready-made, existing module that does these things.</p>
  
  <p><strong>For the love of God don't post an answer with a sketch of an implementation!</strong> This is useless for me. I appreciate your intentions, but in calendar hell, sketches of implementations do not help. I already have a sketch of an implementation, and debugging yours will take just as long as debugging mine.</p>
  
  <p>I am only interested in using an existing module that handles such calendar tasks. <strong>Do you know one?</strong></p>