code: public static long getTimeSpan(Date begin, Date end, int type) {
          long diff = end.getTime() - begin.getTime();
          switch (type) {
              case DAY:
              default:
                  return diff / org.apache.commons.lang.time.DateUtils.MILLIS_PER_DAY;
              case HOUR:
                  return diff / org.apache.commons.lang.time.DateUtils.MILLIS_PER_HOUR;
              case MINUTE:
                  return diff / org.apache.commons.lang.time.DateUtils.MILLIS_PER_MINUTE;
              case SECOND:
                  return diff / org.apache.commons.lang.time.DateUtils.MILLIS_PER_SECOND;
          }
      }
docs: #func 计算时间跨度<br>
  #desc 计算方式：结束时间减开始时间
  
  @author hedan
  @version 4.0