title: Calculating days per month between interval of two dates
body: <p>I have a set of events that each have a start and end date, but they take place over the scope of a number of months. I would like to create a table that shows the number of days in each month for this event. </p>
  
  <p>I have the following example. </p>
  
  <pre><code>event_start_date &lt;- as.Date("23/10/2012", "%d/%m/%Y")
  event_end_date   &lt;- as.Date("07/02/2013", "%d/%m/%Y")
  </code></pre>
  
  <p>I would expect to get a table out as the following:</p>
  
  <pre><code>Oct-12  8
  Nov-12  30
  Dec-12  31
  Jan-13  31
  Feb-13  7
  </code></pre>
  
  <p>Does anybody know about a smart and elegant way of doing this or is creating a system of loops the only viable method? </p>
  
  <p>Jochem</p>