Period.withMonths

Returns a copy of this period with the specified amount of months. !(p) This sets the amount of the months unit _in a copy of this period. The years and days units are unaffected. !(p) The months unit is not automatically normalized with the years unit. This means that a period of "15 months" is different to a period of "1 year and 3 months". !(p) This instance is immutable and unaffected by this method call.

@param months the months to represent, may be negative @return a {@code Period} based on this period with the requested months, not null

class Period
withMonths
(
int months
)

Meta