code: public static function HOUROFDAY($timeValue = 0)
      {
          $timeValue = Functions::flattenSingleValue($timeValue);
  
          if (!is_numeric($timeValue)) {
              if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
                  $testVal = strtok($timeValue, '/-: ');
                  if (strlen($testVal) < strlen($timeValue)) {
                      return Functions::VALUE();
                  }
              }
              $timeValue = self::getTimeValue($timeValue);
              if (is_string($timeValue)) {
                  return Functions::VALUE();
              }
          }
          // Execute function
          if ($timeValue >= 1) {
              $timeValue = fmod($timeValue, 1);
          } elseif ($timeValue < 0.0) {
              return Functions::NAN();
          }
          $timeValue = Date::excelToTimestamp($timeValue);
  
          return (int) gmdate('G', $timeValue);
      }
docs: HOUROFDAY.
  
  Returns the hour of a time value.
  The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).
  
  Excel Function:
  HOUR(timeValue)
  
  @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
  PHP DateTime object, or a standard time string
  
  @return int Hour