code: public static Date dateReservedMonth(int year, int month, boolean is000) {
          Calendar calendar = Calendar.getInstance();
          calendar.set(Calendar.YEAR, year);
          if (month <= 1) {
              calendar.set(Calendar.MONTH, Calendar.JANUARY);
          } else if (month >= 12) {
              calendar.set(Calendar.MONTH, Calendar.DECEMBER);
          } else {
              calendar.set(Calendar.MONTH, month - 1);
          }
          return is000 ? dateReservedMonth000(calendar) : dateReservedMonth999(calendar);
      }
docs: 将指定年月的日期的日,时,分,秒,毫秒调整为最小值或者最大值
  
  @param year  指定年份
  @param month 指定月份
  @param is000 为true表示置为最小值,反之最大值
  @return 被转化后的日期
  @see #dateReservedMonth000(Date)
  @see #dateReservedMonth000(Calendar)
  @see #dateReservedMonth999(Date)
  @see #dateReservedMonth999(Calendar)