title: Determine the number of days a bill range falls into two different date ranges
body: <p>I am trying to calculate how many days a utility bill falls within two categories (date ranges).i.e. a bill range may be between 16/8/14 - 14/10/14 (total of 60 days incl) and I want to work out how many days fall in the  1/10/2014-31/3/15 season and how many days fall within the 1/4/14-30/9/14 season.  It should be 14 and 46 but I am only getting 13 and 44.  Any suggestions? thanks</p>