Days,&rbUSMode,&rnDay);
        ScaDate( nNullDate,nSettle,nBase,&sDay,&sMonth,&sYear,&sbLastDayMode,&sbLastDay,&sb30Days,&sbUSMode,&snDay);
        rYear= sYear;
        nSettle=nSettle+nNullDate;
        aDate=DateToDays( rDay,rMonth,rYear );
        if( aDate > nSettle )
        {
            rYear-= 1;
            aDate=DateToDays( rDay,rMonth,rYear );
        }
        while(aDate <= nSettle )
        {
            addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,12/nFreq,&rYear);
            aDate=DateToDays( rDay,rMonth,rYear );
        }
        return getDiff( nSettle, aDate, sDay, sMonth, sYear, sbLastDayMode, sbLastDay, sb30Days, sbUSMode, snDay, rDay, rMonth, rYear, rbLastDayMode, rbLastDay, rb30Days, rbUSMode, rnDay);
    }
    else
        return coupdays(nSettle,nMat,nFreq,nBase)- coupdaybs( nSettle,nMat,nFreq,nBase);
}
