Language

IChronoLocalDateTime.ITemporal.Plus(ITemporalAmount) Method

Definition

Returns an object of the same type as this object with an amount added.

[Android.Runtime.Register("plus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/chrono/ChronoLocalDateTime;", "GetPlus_Ljava_time_temporal_TemporalAmount_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
override sealed Java.Time.Temporal.ITemporal? ITemporal.Plus(Java.Time.Temporal.ITemporalAmount? amount);
[<Android.Runtime.Register("plus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/chrono/ChronoLocalDateTime;", "GetPlus_Ljava_time_temporal_TemporalAmount_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Java.Time.Temporal.ITemporal.Plus : Java.Time.Temporal.ITemporalAmount -> Java.Time.Temporal.ITemporal
override this.Java.Time.Temporal.ITemporal.Plus : Java.Time.Temporal.ITemporalAmount -> Java.Time.Temporal.ITemporal

Parameters

amount
ITemporalAmount

the amount to add, not null

Returns

an object of the same type with the specified adjustment made, not null

Implements

Attributes

Remarks

Returns an object of the same type as this object with an amount added. This adjusts this temporal, adding according to the rules of the specified amount. The amount is typically a Period but may be any other type implementing the TemporalAmount interface, such as Duration.

date = date.plus(period);                // add a Period instance
date = date.plus(duration);              // add a Duration instance
date = date.plus(workingDays(6));        // example user-written workingDays method

Note that calling plus followed by minus is not guaranteed to return the same date-time.

Java documentation for java.time.chrono.ChronoLocalDateTime.plus(java.time.temporal.TemporalAmount).

Java reference for java.time.chrono.ChronoLocalDateTime.plus.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to