public function add($interval)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->add($interval);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::add($interval);
        }
    }
public function add($interval)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->add($interval);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::add($interval);
        }
    }
public function add ( $ interval ) { if ( self :: $ _immutable ) { self :: $ _immutable = false ; $ newDate = clone $ this ; $ newDate -> add ( $ interval ) ; self :: $ _immutable = true ; return $ newDate ; } else { return parent :: add ( $ interval ) ; } }
Adds an amount of days, months, years, hours, minutes and seconds.

@link http://php.net/manual/en/datetimeimmutable.add.php

@param DateInterval $interval

@return DateTimeImmutable
Adds an amount of days months years hours minutes and seconds .