public function add($interval) : DateTime
    {
        if ($interval instanceof DateInterval) {
            $this->value->add($interval);
            return $this;
        }

        $i = $this->tryToCreateIntervalByDesignators($interval);
        if (!$i) {
            $i = DateInterval::createFromDateString($interval);
        }

        $this->value->add($i);

        return $this;
    }
public function add($interval) : DateTime
    {
        if ($interval instanceof DateInterval) {
            $this->value->add($interval);
            return $this;
        }

        $i = $this->tryToCreateIntervalByDesignators($interval);
        if (!$i) {
            $i = DateInterval::createFromDateString($interval);
        }

        $this->value->add($i);

        return $this;
    }
public function add ( $ interval ) : DateTime { if ( $ interval instanceof DateInterval ) { $ this -> value -> add ( $ interval ) ; return $ this ; } $ i = $ this -> tryToCreateIntervalByDesignators ( $ interval ) ; if ( ! $ i ) { $ i = DateInterval :: createFromDateString ( $ interval ) ; } $ this -> value -> add ( $ i ) ; return $ this ; }
Performs dates arithmetic.

http://php.net/manual/en/datetime.formats.relative.php

Each duration period is represented by an integer value followed by a period
designator. If the duration contains time elements, that portion of the
specification is preceded by the letter T.
Period Designators: Y - years, M - months, D - days, W - weeks, H - hours,
M - minutes, S - seconds.
Examples: two days - 2D, two seconds - T2S, six years and five minutes - 6YT5M.
The unit types must be entered from the largest scale unit on the left to the
smallest scale unit on the right.
Use first "-" char for negative periods.
OR
Relative period.
Examples: "+5 weeks", "12 day", "-7 weekdays", '3 months - 5 days'

@param string|DateInterval $interval Time interval to add.

@return DateTime
Performs dates arithmetic .