contains method

bool contains(
  1. int hour
)

Implementation

bool contains(int hour) {
  return hour >= startHour && hour <= endHour;
}