code: public static Date getNextMonth(Date dt, Long n) {
  
          Calendar cal = new GregorianCalendar();
          cal.setTime(dt);
  
          Calendar firstCal = new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + n.intValue(), 1);
          if (firstCal.getActualMaximum(Calendar.DAY_OF_MONTH) < cal.get(Calendar.DAY_OF_MONTH)) {
              return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + n.intValue(),
                                              firstCal.getActualMaximum(Calendar.DAY_OF_MONTH)).getTime();
          } else {
              return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + n.intValue(),
                                              cal.get(Calendar.DAY_OF_MONTH)).getTime();
          }
  
      }
docs: 如果当天在后续这个月不存在这天，则返回期望这个月的最后一天 20081231 -1 返回20081130
  
  @param dt
  @param n
  
  @return上午11:16:22