final public function plusMonths()

in src/datetime/DateTime/DateTime.php [233:243]


  final public function plusMonths(int $months): Builder<this> {
    if ($months < 0) {
      return $this->minusMonths(-$months);
    }
    $new_month_raw = $this->month + $months - 1;
    return $this->withDate(
      $this->year + (int)($new_month_raw / 12),
      $new_month_raw % 12 + 1,
      $this->day,
    );
  }