Code:
for(i = month+1;i < month_1 - 1;++i); /* <<-- here is your newbie mistake */
days_total += daysinmonth(i);
days_total += days_1;
return days_total;
}