I think I suggested a method before once, that you don't step but use *n instead from the original day,
dminus1=day-Calendar.Month()*1; dminus2=day-Calendar.Month()*2; dminus3=day-Calendar.Month()*3;
and not
dminus1=day-Calendar.Month(); dminus2=dminus1-Calendar.Month(); dminus3=dminus2-Calendar.Month();