Language

Period.PlusMonths(Int64) Method

Definition

Returns a copy of this period with the specified months added.

[Android.Runtime.Register("plusMonths", "(J)Ljava/time/Period;", "", ApiSince=26)]
public Java.Time.Period? PlusMonths(long monthsToAdd);
[<Android.Runtime.Register("plusMonths", "(J)Ljava/time/Period;", "", ApiSince=26)>]
member this.PlusMonths : int64 -> Java.Time.Period

Parameters

monthsToAdd
Int64

the months to add, positive or negative

Returns

a Period based on this period with the specified months added, not null

Attributes

Remarks

Returns a copy of this period with the specified months added. This adds the amount to the months unit in a copy of this period. The years and days units are unaffected. For example, "1 year, 6 months and 3 days" plus 2 months returns "1 year, 8 months and 3 days". This instance is immutable and unaffected by this method call.

Java reference for java.time.Period.plusMonths.

Applies to