I know this is an old thread, but I needed to do the same thing recently and really didn't want to go the manual maintenance route, nor did I want an overly complex solution, so here's what I did:
Step 1: Create 2 line items using MONTH and YEAR to pull the month # and year # from a month. Using MID will ensure you don't get caught in the 4-4-5 rollup.
Step 2. Create a 3rd line item using DAYSINMONTH along with the year # and month # from above to get the correct number of days for each calendar month.