@param int $months

@return Period
487126
public function plusMonths(int $months) : Period
    {
        if ($months === 0) {
            return $this;
        }

        return new Period($this->years, $this->months + $months, $this->days);
    }
222096
public function getMonthNamesNarrow($month = null)
    {
        $calendar = $this->getName();
        // gregorian, generic

        $data = array();
        $calendsFallback = array($calendar, 'gregorian', 'generic');
        foreach ($calendsFallback as $calendar) {
            $data = $this->getRepoReader()->getEntityByPath(
                'dates/calendars/calendar[@type="'.$calendar.'"]/months/monthContext[@type="format"]/monthWidth[@type="abbreviated"]/month'
            );

            if ($data) {
                break;
            }
        }

        $months = array();
        foreach($data as $d) {
            $months[$d['type']] = $d['value'];
        }

        $return = ($month == null) ? $months : false;

        return isset($months[$month]) ? $months[$month] : $return;
    }
1049227
private function setMonth($month) {
        
        //preventing duplication process
        if ($month == $this->month) {
            return;
        }
        $yearToSet  = $this->year;
        $monthToSet = $month;
        
        if ($monthToSet < 1) {
            $monthToSet = abs($monthToSet);
            $yearToSet--;
            
            $yearToSet  -= floor($monthToSet / 12);
            $monthToSet = 12 - ($monthToSet % 12);
            
        } elseif ($monthToSet > 12) {
            $yearToSet  += floor($monthToSet / 12);
            $monthToSet = ($month % 12);
            if ($monthToSet == 0) {
                $monthToSet = 12;
                $yearToSet--;
            }
        }
        
        $this->month = (int) $monthToSet;
        $this->setYear($yearToSet);
    }
571804
public function plusMonths(int $months) : LocalDate
    {
        $month = $this->month + $months - 1;

        $yearDiff = Math::floorDiv($month, 12);
        $month = Math::floorMod($month, 12) + 1;

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

        return $this->resolvePreviousValid($year, $month, $this->day);
    }
799534
public final function setMonth( int $month = null )
      : DateTime
   {

      if ( \is_null( $month ) )
      {
         $month = static::CurrentMonth();
      }

      return $this->setDateParts( null, $month );

   }
565159
public function minusMonths(int $months) : Period
    {
        if ($months === 0) {
            return $this;
        }

        return new Period($this->years, $this->months - $months, $this->days);
    }
642713
public function plusMonths(int $months) : YearMonth
    {
        if ($months === 0) {
            return $this;
        }

        $month = $this->month + $months - 1;

        $yearDiff = Math::floorDiv($month, 12);
        $month = Math::floorMod($month, 12) + 1;

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

        return new YearMonth($year, $month);
    }
999156
public function getSeasonMonthName($season = null, $month = null)
    {
        if ($season === null) {
            $season = $this->getSeason();
        }
        if ($month === null) {
            $month = $this->getMonth();
        }
        if ($month <= 0) {
            $month += count($this->monthNames);
        }
        $idx = ($season - 1) * 3 + ($month - 1);

        return $this->monthNames[$idx];
    }
22479
public function getMonth($year, $monthNo)
    {
        $year = $this->yearOrYearNo($year);

        return new Month($year, $monthNo);
    }
355656
public function getPeriod($role = null) {
        $roles = $this->_get('roles');
        if (!isset($roles[$role])) {
            if ($role === null) {
                return null;
            }
            return $this->getPeriod();
        }
        return (int) $roles[$role]['period'];
    }
162527
public static function MonthsFromDuration( $arg )
	{
		if ( $arg instanceof Undefined )
		    return Undefined::getValue();

	    /**
	     * @var DurationValue $duration
	     */
	    $duration = $arg;

	    return Integer::FromValue( $duration->getMonths() * ( $duration->getInverted() ? -1 : 1 ) );
	}
78318
protected function getMonths()
    {
        $intSecondsPerMonth = ($this->isPositive()) ? DateTimeSpan::SECONDS_PER_MONTH : ((-1) * DateTimeSpan::SECONDS_PER_MONTH);
        $intMonths = floor($this->intSeconds / $intSecondsPerMonth);
        if ($this->isNegative()) {
            $intMonths = (-1) * $intMonths;
        }
        return $intMonths;
    }
1278574
public function subtractMonths($months)
    {
        $months = (int) $months;
        $months = -$months;
        return $this->addMonths($months);
    }
732819
public function plusMonths(int $months) : LocalDateTime
    {
        if ($months === 0) {
            return $this;
        }

        return new LocalDateTime($this->date->plusMonths($months), $this->time);
    }
2021
public function getDays(Month $month)
    {
        $days = array();

        for ($dayNo = 1; $dayNo <= $month->numberOfDays(); $dayNo++) {
            $days[$dayNo] = $this->getDay($month, $dayNo);
        }

        return $days;
    }
324949
protected function parsePeriod($period)
    {
        if (false !== strpos($period, '-')) {
            return $this->parsePeriodFromDates($period);
        }

        return $this->parsePeriodFromName($period);
    }
918008
public static function of(int $years, int $months, int $days) : Period
    {
        return new Period($years, $months, $days);
    }