publicstaticlongdaysBetween(Dated1,Dated2){if((d1==null)||(d2==null)){return0;}longld1=d1.getTime();longld2=d2.getTime();longdays=(long)((ld2-ld1)/86400000);returndays;}