src/Year.php
public function plus(int $years) : Year
    {
        if ($years === 0) {
            return $this;
        }

        $year = $this->year + $years;

        Field\Year::check($year);

        return new Year($year);
    }
public function plus(int $years) : Year
    {
        if ($years === 0) {
            return $this;
        }

        $year = $this->year + $years;

        Field\Year::check($year);

        return new Year($year);
    }
public function plus ( int $ years ) : Year { if ( $ years === 0 ) { return $ this ; } $ year = $ this -> year + $ years ; Field \ Year :: check ( $ year ) ; return new Year ( $ year ) ; }
Returns a copy of this year with the specified number of years added.

This instance is immutable and unaffected by this method call.

@param int $years The years to add, may be negative.

@return Year A Year based on this year with the period added.

@throws DateTimeException If the resulting year exceeds the supported range.
Returns a copy of this year with the specified number of years added .