Modify by an amount of hours.

@param  int  $amount
@param  bool  $invert
@return FTV_Date
481937
protected function modifyHours($amount, $invert = false)
        {
            $interval = new \DateInterval("PT{$amount}H");

            $this->modifyFromInterval($interval, $invert);

            return $this;
        }
412250
public static function decrement(string $key, int $amount = 1, bool $prolong = true)
        {
            if (($cacheValue = self::GetInstance()->get("\$vxnKey:{$key}")) === false) {
                return false;
            }

            foreach ($cacheValue['$_tags'] as $tagName => $ver) {
                if ($ver && $ver != self::tagGetVer($tagName)) {
                    self::GetInstance()->delete("\$vxnKey:{$key}");

                    return false;
                }
            }

            $cacheValue['$_expire'] = ($prolong && $cacheValue['$_ttl']) ? (time() + $cacheValue['$_ttl']) : $cacheValue['$_expire'];

            return self::GetInstance()->set("\$vxnKey:{$key}",
                                            [
                                                '$_data'   => $cacheValue['$_data'] - $amount,
                                                '$_tags'   => $cacheValue['$_tags'],
                                                '$_ttl'    => $cacheValue['$_ttl'],
                                                '$_expire' => $cacheValue['$_expire'],
                                            ],
                                            null,
                                            $cacheValue['$_expire']);
        }
687652
public function saturate($amount)
    {
        if ($amount < 0 || $amount > 100) {
            throw new InvalidArgumentException('The given amount must be between 0 and 100');
        }
        $amount /= 100;
        $this->saturation += (100 - $this->saturation) * $amount;

        return $this;
    }
649783
public function getOffsetFromGmt($hours = false)
    {
        return (float) $hours ? ($this->tz->getOffset($this) / 3600) : $this->tz->getOffset($this);
    }
19159
static public function fromMicro($amount, $divisibility = 6)
    {
        $amt = new Amount(["amount" => $amount]);
        $amt->setDivisibility($divisibility);

        return $amt;
    }
331278
public function incrementMajor($amount = 1)
    {
        $this->major += $amount;
        $this->minor = 0;
        $this->patch = 0;

        return $this;
    }
74458
public static function noCurrency($amount = null)
    {
        if (null === $amount) {
            $amount = '0';
        }

        return self::valueOf(strval($amount), Currency::valueOf(Currency::NONE));
    }
822579
public function reverse($amount = null)
    {
        return (new ManagementBuilder(TransactionType::REVERSAL))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
102908
public function getDiffMessage($count, $invert, $unit)
    {
        if (0 === $count) {
            throw new \InvalidArgumentException('The count must not be null.');
        }

        $unit = strtolower($unit);

        if (!in_array($unit, array('year', 'month', 'day', 'hour', 'minute', 'second'))) {
            throw new \InvalidArgumentException(sprintf('The unit \'%s\' is not supported.', $unit));
        }

        return $this->doGetDiffMessage($count, $invert, $unit);
    }
547263
private static function roundHalfDown($amount)
    {
        $result = self::roundToNearestIntegerIgnoringTies($amount);

        if (null == $result) {
            $result = self::roundToNearestIntegerIgnoringTies(bcsub($amount, '0.1', self::BCSCALE));
        }

        return $result;
    }
1075637
public function limit($offset, $amount = null)
    {
        if (is_null($amount)) {
            $this->append(' LIMIT ' . $offset);
        } else {
            $this->append(sprintf(' LIMIT %s, %s', $offset, $amount));
        }

        return $this;
    }
554575
public function Sub( $duration )
	{
		if ( ! $duration instanceof DurationValue )
		{
			throw new \InvalidArgumentException();
		}

		$duration->Value->invert = ! $duration->Value->invert;
		$this->Add( $duration );

		// // Finally convert $multipliedInterval into a normalized interval
		// /**
		//  * @var \DateTime $dt
		//  */
		// $dt = new \DateTimeImmutable( "2017-06-07" );
		// /**
		//  * @var \DateTime $added
		//  */
		// $added = $dt->add( $this->Value );
		// $duration->Value->invert = ! $duration->Value->invert;
		// /**
		//  * @var \DateTime $subtracted
		//  */
		// $subtracted = $added->add( $duration->Value );
		// /**
		//  * @var \DateInterval $diff
		//  */
		// $diff = $subtracted->diff( $dt );
		// $diff->invert = $diff->days == 0 ? false : ! $diff->invert;
        //
		// $this->Value = $diff;
	}
285122
public function subtractHours($hours)
    {
        $hours = (int) $hours;
        $hours = -$hours;
        return $this->addHours($hours);
    }
457885
private static function roundHalfAwayFromZero($amount)
    {
        if (0 <= bccomp($amount, '0', self::BCSCALE)) {
            $result = self::roundHalfUp($amount);
        } else {
            $result = self::roundHalfDown($amount);
        }

        return $result;
    }
599356
private static function roundHalfUp($amount)
    {
        $result = self::roundToNearestIntegerIgnoringTies($amount);

        if (null == $result) {
            $result = self::roundToNearestIntegerIgnoringTies(bcadd($amount, '0.1', self::BCSCALE));
        }

        return $result;
    }
425745
private function convertDate($time, $from, $format = "Y-m-d") {
            return \AsyncWeb\Date\Time::ConvertDate($time, $from, $format);
        }
866614
protected function modifyYears($amount, $invert = false)
        {
            $interval = new \DateInterval("P{$amount}Y");

            $this->modifyFromInterval($interval, $invert);

            return $this;
        }