changes date by given amount of hours

@api
@param   int  $hours
@return  \stubbles\date\Date
6718
public function byHours(int $hours): Date
    {
        return $this->hourTo($this->originalDate->hours() + $hours);
    }
362336
function setHour( $hour )
    {
        $arr = getdate( $this->DateTime );
        $this->DateTime = mktime( $hour, $arr['minutes'], $arr['seconds'],
                                  $arr['mon'], $arr['mday'], $arr['year'] );
    }
526476
public function setSkipHours(array $hours)
    {
        if (count($hours) > 24) {
            /**
             * @see Zend_Feed_Builder_Exception
             */
            require_once 'Zend/Feed/Builder/Exception.php';
            throw new Zend_Feed_Builder_Exception("you can not have more than 24 rows in the skipHours property");
        }
        foreach ($hours as $hour) {
            if ($hour < 0 || $hour > 23) {
                /**
                 * @see Zend_Feed_Builder_Exception
                 */
                require_once 'Zend/Feed/Builder/Exception.php';
                throw new Zend_Feed_Builder_Exception("$hour has te be between 0 and 23");
            }
        }
        $this->offsetSet('skipHours', $hours);
        return $this;
    }
105228
public function changeTime( Time $time )
      : DateTime
   {

      return $this->setTime( $time->getHour(), $time->getMinute(), $time->getSecond() );

   }
861342
public function translate($date): Date
    {
        $handle = Date::castFrom($date)->handle();
        $handle->setTimezone($this->timeZone);
        return new Date($handle);
    }
698174
function convertToHours()
    {
        $totalMinutes = $this->minutes;
        $Mins = ($totalMinutes % 60);
        $Hours = floor(abs($totalMinutes) / 60);
        if ($totalMinutes < 0) {
            $Hours = '-' . $Hours;
            $Mins = substr($Mins, 1);
        } else {
            $Hours = floor($totalMinutes / 60);
        }
        $Mins = str_pad($Mins, 2, '0', STR_PAD_LEFT);
        $this->HM = new HM($Hours, $Mins);

        return $this;
    }
432265
public static function _convert_time($time)
    {
        $reference = new DateTimeImmutable;
        $endTime = $reference->add(new DateInterval($time));

        return $endTime->getTimestamp() - $reference->getTimestamp();
    }
901752
public function setValue($value)
    {
        if ($value instanceof \DateTime) {
            $this->value = $value->getTimestamp();
        } else {
            $this->value = $value;
        }

        return $this;
    }
46749
public static function ConvertDate($source, $sourceFormat, $targetFormat, $separator = "/", $hour = false)
	{
		$timestamp = DateUtil::TimeStampFromStr($source, $sourceFormat, $hour);
		return DateUtil::FormatDate($timestamp, $targetFormat, $separator, $hour);
	}
862423
public function setTime($time)
    {
        //argument 1 must be an integer or string
        Argument::i()->test(1, 'int', 'string');
        if (is_string($time)) {
            $time = strtotime($time);
        }

        $this->time = $time - $this->offset;
        return $this;
    }
118171
public function withHour(int $hour) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->withHour($hour), $this->timeZone);
    }
1251586
protected function overrideTime(\DateTimeInterface $date, array $source)
    {
        $hour = isset($source['hour']) ? (integer)$source['hour'] : 0;
        $minute = isset($source['minute']) ? (integer)$source['minute'] : 0;
        $second = isset($source['second']) ? (integer)$source['second'] : 0;
        if ($date instanceof \DateTime || $date instanceof \DateTimeImmutable) {
            $date = $date->setTime($hour, $minute, $second);
        }
        return $date;
    }
1198886
public final function addMinutes( int $minutes = 1 )
      : DateTime
   {

      return $this->move( new \DateInterval( 'PT' . \abs( $minutes ) . 'M' ), $minutes < 0 );

   }
961605
public static function HoursFromTime( $arg )
	{
		if ( $arg instanceof Undefined )
		{
			return Undefined::getValue();
		}

		if ( ! $arg instanceof TimeValue )
		{
			return Undefined::getValue();
		}

		/**
		 * @var TimeValue $time
		 */
		$time = $arg;
		return $time->Value->format( "H" ) + 0;
	}
630656
public function setChanged($changed)
    {
        if (is_string($changed)) {
            $changed = new \DateTime($changed);
        }
        $this->getFileVersion()->setChanged($changed);

        return $this;
    }
871616
public function setDate($date = null)
    {
        if (!$date) {
            $date = date('d.m.Y H:i:s', time());
        }

        // format date
        $date = $this->formatDate($date);

        // get timestamp from date
        $date = $this->_getTimestamp(
            $date[0], // hour
            $date[1], // minute
            $date[2], // second
            $date[3], // month
            $date[4], // day
            $date[5]  // year
        );

        // update current date/time
        $this->dateTime->setTimestamp($date);
    }
1264964
protected function setTime($time) {

        if ($time === null) {
            $time = 0;
        }

        $this->time = new \DateTime('@' . $time);
        return $this;

    }