code: @Override
      public Temporal addTo(Temporal temporal) {
          validateChrono(temporal);
          if (months == 0) {
              if (years != 0) {
                  temporal = temporal.plus(years, YEARS);
              }
          } else {
              long totalMonths = toTotalMonths();
              if (totalMonths != 0) {
                  temporal = temporal.plus(totalMonths, MONTHS);
              }
          }
          if (days != 0) {
              temporal = temporal.plus(days, DAYS);
          }
          return temporal;
      }
docs: Adds this period to the specified temporal object.
  <p>
  This returns a temporal object of the same observable type as the input
  with this period added.
  If the temporal has a chronology, it must be the ISO chronology.
  <p>
  In most cases, it is clearer to reverse the calling pattern by using
  {@link Temporal#plus(TemporalAmount)}.
  <pre>
  // these two lines are equivalent, but the second approach is recommended
  dateTime = thisPeriod.addTo(dateTime);
  dateTime = dateTime.plus(thisPeriod);
  </pre>
  <p>
  The calculation operates as follows.
  First, the chronology of the temporal is checked to ensure it is ISO chronology or null.
  Second, if the months are zero, the years are added if non-zero, otherwise
  the combination of years and months is added if non-zero.
  Finally, any days are added.
  <p>
  This approach ensures that a partial period can be added to a partial date.
  For example, a period of years and/or months can be added to a {@code YearMonth},
  but a period including days cannot.
  The approach also adds years and months together when necessary, which ensures
  correct behaviour at the end of the month.
  <p>
  This instance is immutable and unaffected by this method call.
  
  @param temporal  the temporal object to adjust, not null
  @return an object of the same type with the adjustment made, not null
  @throws DateTimeException if unable to add
  @throws ArithmeticException if numeric overflow occurs