public static long calculateDays(Date mDate1,Date mDate2){
  return Math.abs((mDate1.getTime() - mDate2.getTime()) / (24 * 60 * 60* 1000) + 1);
}

public static long calculateDays ( Date mDate1 , Date mDate2 ) { return Math . abs ( ( mDate1 . getTime ( ) - mDate2 . getTime ( ) ) / ( 24 * 60 * 60 * 1000 ) + 1 ) ; }
calculate difference form two dates note : both dates are in same format .
