MonthListTmp GetMonthyearList()
{
MonthListTmp listMonthYearTmp;
int i,j,k,l,m,n;
;
k = mthOfYr(fromdate);
l = year(fromdate);
m = mthOfYr(todate);
n = year(todate);
delete_from listMonthYearTmp;
for (i=k;i<=12;i++)
{
listMonthYearTmp.clear();
listMonthYearTmp.Month = i;
listMonthYearTmp.year = l;
listMonthYearTmp.insert();
if(m == i && l == n)
break;
if(i==12)
{
i=0;
l = l+1;
}
}
return listMonthYearTmp;
}
{
MonthListTmp listMonthYearTmp;
int i,j,k,l,m,n;
;
k = mthOfYr(fromdate);
l = year(fromdate);
m = mthOfYr(todate);
n = year(todate);
delete_from listMonthYearTmp;
for (i=k;i<=12;i++)
{
listMonthYearTmp.clear();
listMonthYearTmp.Month = i;
listMonthYearTmp.year = l;
listMonthYearTmp.insert();
if(m == i && l == n)
break;
if(i==12)
{
i=0;
l = l+1;
}
}
return listMonthYearTmp;
}
No comments:
Post a Comment