code: public static final int daysBetween(Date early, Date late) {
          java.util.GregorianCalendar calst = new java.util.GregorianCalendar();
          java.util.GregorianCalendar caled = new java.util.GregorianCalendar();
          calst.setTime(early);
          caled.setTime(late);
          // 设置时间为0时
          calst.set(java.util.GregorianCalendar.HOUR_OF_DAY, 0);
          calst.set(java.util.GregorianCalendar.MINUTE, 0);
          calst.set(java.util.GregorianCalendar.SECOND, 0);
          caled.set(java.util.GregorianCalendar.HOUR_OF_DAY, 0);
          caled.set(java.util.GregorianCalendar.MINUTE, 0);
          caled.set(java.util.GregorianCalendar.SECOND, 0);
  
          // 得到两个日期相差的天数
          int days = ((int) (caled.getTime().getTime() / 1000 / 3600 / 24) - (int) (calst
                  .getTime().getTime() / 1000 / 3600 / 24));
          return days;
      }
docs: Returns the days between two dates. Positive values indicate that the
  second date is after the first, and negative values indicate, well, the
  opposite. Relying on specific times is problematic.
  
  @param early
  the "first date"
  @param late
  the "second date"
  @return the days between the two dates