code: @Override
      public ValueRange range(TemporalField field) {
          if (field instanceof ChronoField) {
              if (isSupported(field)) {
                  // day 29 is treated as being outside the normal week
                  ChronoField f = (ChronoField) field;
                  switch (f) {
                      case ALIGNED_DAY_OF_WEEK_IN_MONTH:
                      case ALIGNED_DAY_OF_WEEK_IN_YEAR:
                      case DAY_OF_WEEK:
                          return isSpecialDay() ? EMPTY_RANGE : ValueRange.of(1, DAYS_IN_WEEK);
                      case ALIGNED_WEEK_OF_MONTH:
                          return isSpecialDay() ? EMPTY_RANGE : ValueRange.of(1, WEEKS_IN_MONTH);
                      case ALIGNED_WEEK_OF_YEAR:
                          return isSpecialDay() ? EMPTY_RANGE : ValueRange.of(1, WEEKS_IN_YEAR);
                      case DAY_OF_MONTH:
                          return ValueRange.of(1, lengthOfMonth());
                      case DAY_OF_YEAR:
                          return isLeapYear ? DAY_OF_YEAR_LEAP_RANGE : DAY_OF_YEAR_NORMAL_RANGE;
                      case EPOCH_DAY:
                          return EPOCH_DAY_RANGE;
                      case ERA:
                          return ERA_RANGE;
                      case MONTH_OF_YEAR:
                          return MONTH_OF_YEAR_RANGE;
                      default:
                          break;
                  }
              } else {
                  throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
              }
          }
          return super.range(field);
      }
docs: -----------------------------------------------------------------------