Element hour = (Element) hours.get(i);
int value = Integer.parseInt(hour.getText().trim());
if (isHourFormat24()) {
if ((value < 1) || (value > 24)) {
throw new FeedException("Invalid hour value " + value + ", it must be between 1 and 24");
}
} else {
if ((value < 0) || (value > 23)) {
throw new FeedException("Invalid hour value " + value + ", it must be between 0 and 23");
}
}
}
}
}