I have a feeling this is going to get ugly quick

but here goes.
I have table rows with dates (IE: Sunday, January 1, 2011). I need to be able to "clone" the rows with this caveat.
I need to recalculate the number of rows based on a day/week combination.. ex: September 1st 2011 falls on a Thursday so my pattern would look like this:
Thursday
Friday
spacer
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
spacer
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
etc.
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday -- end of the month.
yeah I know... yeech..
Anyways any help would be greatly appreciated.
Thanks
Scott Stewart