lparameters tdStart, tdEnd local ldStart, ldEnd, lnMonths ldEnd = max(tdStart,tdEnd) && Swap start-end if necessary ldStart = min(tdStart,tdEnd) lnMonths = int((ldEnd-ldStart)/28) && Max possible months do while gomonth(ldStart,lnMonths)>ldEnd lnMonths = lnMonths - 1 enddo return lnMonthsCetin