Lines Matching refs:months

1200      *  Returns a {@code LocalDate} with the specified number of months added.
1307 * Returns a copy of this {@code LocalDate} with the specified number of months added.
1309 * This method adds the specified amount to the months field in three steps:
1311 * <li>Add the input months to the month-of-year field</li>
1322 * @param monthsToAdd the months to add, may be negative
1323 * @return a {@code LocalDate} based on this date with the months added, not null
1477 * Returns a copy of this {@code LocalDate} with the specified number of months subtracted.
1479 * This method subtracts the specified amount from the months field in three steps:
1481 * <li>Subtract the input months from the month-of-year field</li>
1492 * @param monthsToSubtract the months to subtract, may be negative
1493 * @return a {@code LocalDate} based on this date with the months subtracted, not null
1609 * For example, the amount in months between 2012-06-15 and 2012-08-14
1610 * will only be one month as it is one day short of two months.
1674 * This calculates the period between two dates in terms of years, months and days.
1683 * The period is calculated by removing complete months, then calculating
1685 * The number of months is then normalized into years and months based on a 12 month year.
1688 * For example, from {@code 2010-01-15} to {@code 2011-03-18} is "1 year, 2 months and 3 days".
1717 int months = (int) (totalMonths % 12); // safe
1718 return Period.of(Math.toIntExact(years), months, days);
1766 long months = step.toTotalMonths();
1768 if ((months < 0 && days > 0) || (months > 0 && days < 0)) {
1769 throw new IllegalArgumentException("period months and days are of opposite sign");
1774 int sign = months > 0 || days > 0 ? 1 : -1;
1778 if (months == 0) {
1784 long steps = until * 1600 / (months * 48699 + days * 1600) + 1;
1785 long addMonths = months * steps;
1787 long maxAddMonths = months > 0 ? MAX.getProlepticMonth() - getProlepticMonth()
1793 addMonths -= months;
1801 n -> this.plusMonths(months * n).plusDays(days * n));