cdm/src/main/java/uk/ac/rdg/resc/edal/time/DayOfMonthOfFixedYearDateTimeField.java
@Override
    public int getMaximumValue(ReadablePartial partial, int[] values) {
        int size = partial.size();
        for (int i = 0; i < size; i++) {
            if (partial.getFieldType(i) == DateTimeFieldType.monthOfYear()) {
                int month = values[i];
                return this.daysInMonth[month - 1];
            }
        }
        return this.getMaximumValue();
    }
@Override
    public int getMaximumValue(ReadablePartial partial, int[] values) {
        int size = partial.size();
        for (int i = 0; i < size; i++) {
            if (partial.getFieldType(i) == DateTimeFieldType.monthOfYear()) {
                int month = values[i];
                return this.daysInMonth[month - 1];
            }
        }
        return this.getMaximumValue();
    }
Adapted from the package-private BasicDayOfMonthDateTimeField