YearMonth.withMonth

Returns a copy of this {@code YearMonth} with the month-of-year altered. !(p) This instance is immutable and unaffected by this method call.

@param month the month-of-year to set _in the returned year-month, from 1 (January) to 12 (December) @return a {@code YearMonth} based on this year-month with the requested month, not null @throws DateTimeException if the month-of-year value is invalid

class YearMonth
withMonth
(
int month
)

Meta