@param ZonedDateTime $from
@param ZonedDateTime $to

@return bool
181769
public function isBetweenExclusive(ZonedDateTime $from, ZonedDateTime $to) : bool
    {
        return $this->isAfter($from) && $this->isBefore($to);
    }
1172711
public static function DateRangeDiff(string $from, string $to)
    {
        $date_Range = new \Phunc\DateRange\DateRange();
        $date_Range->fillFromString($from, $to);
        $date_Range->getFrom()->hour(0)->minute(0)->second(0);
        $date_Range->getTo()->hour(24); //->minute(59)->second(59);
        return $date_Range->diffInDays();
    }
1101396
public static function dateDiff(DateTime $from = null, DateTime $to = null, string $format = 'Y-m-d H:i:s'): string
    {
        if (!$from) {
            return '';
        }
        if (!$to) { // if not define to then to date is set today
            $to = new DateTime();
        }
        return $from->diff($to)->format($format);
    }
837409
public function move($from, $to)
    {
        event(new Events\FileMoving($from, $to));
        $moved = $this->disk()->move($from, $to);
        event(new Events\FileMoved($from, $to, $moved));

        return $moved;
    }
86501
public function getDuration($from = Timer::START, $to = Timer::STOP) {
        $from = $this->getCheckpoint($from);
        $to = $this->getCheckpoint($to);

        if ($from === null) {
            return 0;
        }

        if ($to === null) {
            $to = microtime(true);
        }

        return abs($to - $from);
    }
900718
public function replaceUser(User $from, User $to)
    {
        $corrections = $this->em->getRepository('IcapDropzoneBundle:Correction')->findByUser($from);

        if (count($corrections) > 0) {
            foreach ($corrections as $correction) {
                $correction->setUser($to);
            }

            $this->em->flush();
        }

        return count($corrections);
    }
1008321
private function validateTimezoneTime(int $hour, int $minutes): bool
    {
        if (!$this->validateHour($hour)) {
            return false;
        }
        if (!$this->validateMinutes($minutes)) {
            return false;
        }
        return true;
    }
1082618
public static function to_timezone(string $date, $from='UTC', $to='UTC') {
		ref\format::to_timezone($date, $from, $to);
		return $date;
	}
801660
public function move($messages, $from, $to)
    {
        if (!$this->select($from)) {
            return false;
        }

        if (!$this->data['READ-WRITE']) {
            $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
            return false;
        }

        // use MOVE command (RFC 6851)
        if ($this->hasCapability('MOVE')) {
            // Clear last COPYUID data
            unset($this->data['COPYUID']);

            // Clear internal status cache
            unset($this->data['STATUS:'.$to]);
            $this->clear_status_cache($from);

            $result = $this->execute('UID MOVE', array(
                $this->compressMessageSet($messages), $this->escape($to)),
                self::COMMAND_NORESPONSE);

            return $result == self::ERROR_OK;
        }

        // use COPY + STORE +FLAGS.SILENT \Deleted + EXPUNGE
        $result = $this->copy($messages, $from, $to);

        if ($result) {
            // Clear internal status cache
            unset($this->data['STATUS:'.$from]);

            $result = $this->flag($from, $messages, 'DELETED');

            if ($messages == '*') {
                // CLOSE+SELECT should be faster than EXPUNGE
                $this->close();
            }
            else {
                $this->expunge($from, $messages);
            }
        }

        return $result;
    }
651603
public static function supports($from, $to) {
        // This is not a one-liner because of php 5.6.
        $imports = self::$imports;
        $exports = self::$exports;
        return isset($imports[$from]) && isset($exports[$to]);
    }
98852
private function guardValidAgeRange(Age $from = null, Age $to = null)
    {
        if ($from && $to && $from > $to) {
            throw new InvalidAgeRangeException('"from" age should not exceed "to" age');
        }
    }
451636
public function migrateExpiredJobs($from, $to)
    {
        //$options = ['cas' => true, 'watch' => $from, 'retry' => 10];
        $attempts = 10;

        do {
            //echo $attempts.'';

            $jobs = $this->getExpiredJobs(
                $this->getConnection(), $from, $time = $this->getTime()
            );

            //var_dump($jobs);

            if (count($jobs) > 0) {
                $this->removeExpiredJobs($this->getConnection(), $from, $time);

                $this->pushExpiredJobsOntoNewQueue($this->getConnection(), $to, $jobs);
            }
            //var_dump($queue->isEmpty());

            /*if ($queue->isEmpty()) {
                $this->getConnection()->unwatch($from);
                $this->getConnection()->discard();
                return;
            }*/

            $execResponse = $this->getConnection()->exec();
            //var_dump( $execResponse);

            if ($execResponse === null) {
                continue;
            }

            break;

        } while ($attempts-- > 0);

    }
849545
public function moveFile( $from, $to )
	{
		$this->connection->checkConnection();
		return @ftp_rename( $this->connection->getResource(), $from, $to );
	}
1310154
public function formatDiff(DateTimeInterface $from, DateTimeInterface $to)
    {
        static $units = array(
            'y' => 'year',
            'm' => 'month',
            'd' => 'day',
            'h' => 'hour',
            'i' => 'minute',
            's' => 'second'
        );

        $diff = $to->diff($from);

        foreach ($units as $attribute => $unit) {
            $count = $diff->$attribute;
            if (0 !== $count) {
                return $this->doGetDiffMessage($count, $diff->invert, $unit);
            }
        }

        return $this->getEmptyDiffMessage();
    }
894198
public function sync(string $from, string $to, array $config = []): void
    {
        $this->syncPlugin->sync($this, $from, $to, $config);
    }
1188360
public static function rangeFromBoundaries($from, $to)
    {
        $result = null;
        $invalid = false;
        foreach (array('from', 'to') as $param) {
            if (!($$param instanceof AddressInterface)) {
                $$param = (string) $$param;
                if ($$param === '') {
                    $$param = null;
                } else {
                    $$param = static::addressFromString($$param);
                    if ($$param === null) {
                        $invalid = true;
                    }
                }
            }
        }
        if ($invalid === false) {
            $result = static::rangeFromBoundaryAddresses($from, $to);
        }

        return $result;
    }
942658
public static function copyDirRecursively($from, $to)
    {
        if (! $path = self::getFilesFromDir($from)) {
            return false;
        }

        self::createDir($to = rtrim($to, '/') . '/');

        foreach ($path as $file) {
            if ($file->isFile()) {
                if (! copy($file->getRealPath(), $to . $file->getFilename())) {
                    return false;
                }
            } elseif (! $file->isDot() && $file->isDir()) {
                self::copyDirRecursively($file->getRealPath(), $to . $path);
            }
        }

        return true;
    }