@param int $hourOfDay The hour-of-day to check.

@return void

@throws DateTimeException If the hour-of-day is not valid.
180853
public static function check(int $hourOfDay) : void
    {
        if ($hourOfDay < 0 || $hourOfDay > 23) {
            throw DateTimeException::fieldNotInRange(self::NAME, $hourOfDay, 0, 23);
        }
    }
690406
function setHour( $hour )
    {
        $this->Time = ($hour % 24) * self::SECONDS_AN_HOUR + $this->minute() * self::SECONDS_A_MINUTE + $this->second();
        $this->IsValid = $this->Time >= 0;
    }
1217001
private function checktime(int $hour, int $minute, int $second)
    {
        if ($hour < 0 || $hour > 23) {
            return false;
        } elseif ($minute < 0 || $minute > 59) {
            return false;
        } elseif ($second < 0 || $second > 59) {
            return false;
        }

        return true;
    }
101299
public static function check(int $weekOfYear, int $year = null) : void
    {
        if ($weekOfYear < 1 || $weekOfYear > 53) {
            throw DateTimeException::fieldNotInRange(self::NAME, $weekOfYear, 1, 53);
        }

        if ($weekOfYear === 53 && $year !== null && ! self::is53WeekYear($year)) {
            throw new DateTimeException("Year $year does not have 53 weeks");
        }
    }
346277
public function setHiddenBeforeDateTime(\DateTimeInterface $dateTime = null): void
    {
        if ($this->getHiddenBeforeDateTime() instanceof \DateTime && $dateTime instanceof \DateTime && $this->getHiddenBeforeDateTime()->format(\DateTime::W3C) === $dateTime->format(\DateTime::W3C)) {
            return;
        }
        $this->materializeNodeDataAsNeeded();
        $this->nodeData->setHiddenBeforeDateTime($dateTime);

        $this->context->getFirstLevelNodeCache()->flush();
        $this->emitNodeUpdated($this);
    }
403482
private function validateTime(int $hour, int $minutes, int $seconds): bool
    {
        if (!$this->validateHour($hour)) {
            return false;
        }
        if (!$this->validateMinutes($minutes)) {
            return false;
        }
        if (!$this->validateSeconds($seconds)) {
            return false;
        }
        return true;
    }
205338
public function valid(\DateTime $now)
    {
        if (false === $this->checkMinute($now)) {
            return false;
        }
        if (false === $this->checkHour($now)) {
            return false;
        }
        if (false === $this->checkDay($now)) {
            return false;
        }
        if (false === $this->checkMonth($now)) {
            return false;
        }
        if (false === $this->checkDayOfWeek($now)) {
            return false;
        }

        return true;
    }
1191529
public static function check(int $offsetMinute) : void
    {
        if ($offsetMinute < -59 || $offsetMinute > 59) {
            throw DateTimeException::fieldNotInRange(self::NAME, $offsetMinute, -59, 59);
        }
    }
99740
public function setValue($value)
	{
		if ($value instanceof \DateTime)
			$value = $value->format($this->format);
		parent::setValue($value);
	}
475805
public static function check(int $nanoOfSecond) : void
    {
        if ($nanoOfSecond < 0 || $nanoOfSecond > 999999999) {
            throw DateTimeException::fieldNotInRange(self::NAME, $nanoOfSecond, 0, 999999999);
        }
    }
456980
public function setDate(\DateTime $date): void
    {
        $this->getFileElement()->setAttributeNS(static::XLIFF_NS, 'date', $date->format(\DateTime::ATOM));
    }
664813
public function isWorkDay(\DateTime $date = null): bool
	{
		return Day::isWork($this->configuration->getHolidays(), $date ?: $this);
	}
196842
public final function setDay( int $day = null )
      : DateTime
   {

      if ( \is_null( $day ) )
      {
         $day = static::CurrentDay();
      }

      return $this->setDateParts( null, null, $day );

   }
1254441
public static boolean isValid(@Nullable final String dayOpeningHours) {
        if (dayOpeningHours == null) {
            return true;
        }
        final int p = dayOpeningHours.indexOf(' ');
        if (p < 0) {
            return false;
        }
        final String dayOfTheWeekStr = dayOpeningHours.substring(0, p);
        final String hourRangesStr = dayOpeningHours.substring(p + 1);
        return DayOfTheWeek.isValid(dayOfTheWeekStr) && HourRanges.isValid(hourRangesStr);
    }
234086
public static function isValidDateTime($dateTime)
    {
        $t = explode(' ', $dateTime);
        if ($this->isValidDate($t[0]) && $this->isValidDate($t[1])) {
            return true;
        } else {
            return false;
        }
    }
316418
public function isDayOfWeek($dayOfWeek)
    {
        if (is_string($dayOfWeek) && defined($constant = static::class.'::'.strtoupper($dayOfWeek))) {
            $dayOfWeek = constant($constant);
        }

        return $this->dayOfWeek === $dayOfWeek;
    }
1160269
public function isInDay(DateTimeInterface $now) : bool
	{
		if (($days = $this->values[static::DAYS]) !== NULL) {
			return in_array($now->format('D'), $days);
		}

		return TRUE;
	}