코드

DateTime dateTime = new DateTime(year, month, day, hour, minute);
LocalDate maxiumDayInMonth = dateTime.toLocalDate().dayOfMonth().withMaximumValue();