code: public int getDayDifference(long first, long second) {
  
          Calendar firstDay = getStartOfDay(first);
          Calendar secondDay = getStartOfDay(second);
          int result = 0;
          if (first >= second) {
              while (firstDay.after(secondDay)) {
                  firstDay.add(Calendar.DAY_OF_MONTH, -1);
                  result += 1;
              }
          } else {
              while (secondDay.after(firstDay)) {
                  secondDay.add(Calendar.DAY_OF_MONTH, -1);
                  result -= 1;
              }
          }
          return result;
      }
docs: Gets the difference in days between to dates given as longs.<p>
  
  The first date must be later than the second date.
  
  @param first the first date
  @param second the second date
  
  @return the difference between the two dates in days