The simplest approach is probably to use something like:
public int getHoursInDay(LocalDate date, DateTimeZone zone) {
DateTime start = date.toDateTimeAtStartOfDay(zone);
DateTime end = date.plusDays(1).toDateTimeAtStartOfDay(zone);
return new Duration(start, end).getStandardHours();
}
EDIT: If you're using a version of Joda Time which doesn't support Duration.getStandardHours()
you could use:
public int getHoursInDay(LocalDate date, DateTimeZone zone) {
DateTime start = date.toDateTimeAtStartOfDay(zone);
DateTime end = date.plusDays(1).toDateTimeAtStartOfDay(zone);
long millis = new Duration(start, end).getMillis();
return (int) (millis / DateTimeConstants.MILLIS_PER_HOUR);
}