private void checkDate(final int year, final int month, final int day) {
if ((month < 1) || (month > 12)) {
throw new IllegalArgumentException("Month must be in the range 1 - 12 inclusive");
}
final DateTime newDate = newDateTime(year, month, 1);
final int lastDayOfMonth = newDate.dayOfMonth().getMaximumValue();
;
if ((day < 1) || (day > lastDayOfMonth)) {
throw new IllegalArgumentException("Day must be in the range 1 - " + lastDayOfMonth + " inclusive: " + day);
}
}