nextHour method

Solar nextHour(
  1. int hours
)

Implementation

Solar nextHour(int hours) {
  int h = _hour + hours;
  int n = h < 0 ? -1 : 1;
  int hour = h.abs();
  int days = (hour / 24).floor() * n;
  hour = (hour % 24) * n;
  if (hour < 0) {
    hour += 24;
    days--;
  }
  Solar solar = next(days);
  return Solar.fromYmdHms(solar.getYear(), solar.getMonth(), solar.getDay(), hour, solar.getMinute(), solar.getSecond());
}