code: public static void checkDate(
          int year,
          int month,
          int dayOfMonth
      ) {
  
          if (year < MIN_YEAR || year > MAX_YEAR) {
              throw new IllegalArgumentException(
                  "YEAR out of range: " + year);
          } else if ((month < 1) || (month > 12)) {
              throw new IllegalArgumentException(
                  "MONTH out of range: " + month);
          } else if ((dayOfMonth < 1) || (dayOfMonth > 31)) {
              throw new IllegalArgumentException(
                  "DAY_OF_MONTH out of range: " + dayOfMonth);
          } else if (dayOfMonth > getLengthOfMonth(year, month)) {
              throw new IllegalArgumentException(
                  "DAY_OF_MONTH exceeds month length in given year: "
                  + toString(year, month, dayOfMonth));
          }
  
      }
docs: /*[deutsch]
  <p>&Uuml;berpr&uuml;ft die Bereichsgrenzen der Datumswerte nach
  den gregorianischen Kalenderregeln. </p>
  
  @param   year        proleptic iso year [(-999999999) - 999999999]
  @param   month       gregorian month (1-12)
  @param   dayOfMonth  day of month (1-31)
  @throws  IllegalArgumentException if any argument is out of range
  @see     #isValid(int, int, int)