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

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

            return $newDate;
        } else {
            return parent::modify($modify);
        }
    }
public function modify ( $ modify ) { if ( self :: $ _immutable ) { self :: $ _immutable = false ; $ newDate = clone $ this ; $ newDate -> modify ( $ modify ) ; self :: $ _immutable = true ; return $ newDate ; } else { return parent :: modify ( $ modify ) ; } }
Creates a new object with modified timestamp.

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

@param string $modify

@return DateTimeImmutable|false
Creates a new object with modified timestamp .