Need to simplify/shorten this code. Help.

Im doing this days between dates prog and I need to shorten this fuction without loosing its purpose. Can someone help.

Code:

`int days (int yer2,int yer1,int mnth2,int mnth1,int day1,int day2)`

{

int fyear1,syear1,fyear2,syear2,theyer1,theyer2;

if (mnth1==1 || mnth2==1 || mnth1==2 || mnth2==2)

{

fyear1=int((yer1-1)/100);

syear1=2-fyear1+int(fyear1/4);

fyear2=int((yer2-1)/100);

syear2=2-fyear2+int(fyear2/4);

theyer1=int(365.25*(yer1-1))+int(30.6001*(mnth1+13))+fyear1+day1+1720995;

theyer2=int(365.25*(yer2-1))+int(30.6001*(mnth2+13))+syear2+day2+1720995;

}

else

{

fyear1=int(yer1/100);

fyear1=2-fyear1+(int(fyear1/4));

syear2=int(yer2/100);

syear2=2-syear2+(int(syear2/4));

theyer1=int(365.25*(yer1))+int(30.6001*(mnth1+1))+fyear1+day1+1720995;

theyer2=int(365.25*(yer2))+int(30.6001*(mnth2+1))+syear2+day2+1720995;

}

return abs(theyer1-theyer2);

}