Lines Matching refs:months
1221 * Returns a copy of this {@code OffsetDateTime} with the specified number of months added.
1223 * This method adds the specified amount to the months field in three steps:
1225 * <li>Add the input months to the month-of-year field</li>
1236 * @param months the months to add, may be negative
1237 * @return an {@code OffsetDateTime} based on this date-time with the months added, not null
1240 public OffsetDateTime plusMonths(long months) {
1241 return with(dateTime.plusMonths(months), offset);
1410 * Returns a copy of this {@code OffsetDateTime} with the specified number of months subtracted.
1412 * This method subtracts the specified amount from the months field in three steps:
1414 * <li>Subtract the input months from the month-of-year field</li>
1425 * @param months the months to subtract, may be negative
1426 * @return an {@code OffsetDateTime} based on this date-time with the months subtracted, not null
1429 public OffsetDateTime minusMonths(long months) {
1430 return (months == Long.MIN_VALUE ? plusMonths(Long.MAX_VALUE).plusMonths(1) : plusMonths(-months));
1618 * For example, the amount in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z
1619 * will only be one month as it is one minute short of two months.