LocalTime.Plus Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Plus(ITemporalAmount) |
Returns a copy of this time with the specified amount added. |
| Plus(Int64, ITemporalUnit) |
Returns a copy of this time with the specified amount added. |
Plus(ITemporalAmount)
Returns a copy of this time with the specified amount added.
[Android.Runtime.Register("plus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/LocalTime;", "", ApiSince=26)]
public Java.Time.LocalTime? Plus(Java.Time.Temporal.ITemporalAmount? amountToAdd);
[<Android.Runtime.Register("plus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/LocalTime;", "", ApiSince=26)>]
member this.Plus : Java.Time.Temporal.ITemporalAmount -> Java.Time.LocalTime
Parameters
- amountToAdd
- ITemporalAmount
the amount to add, not null
Returns
a LocalTime based on this time with the addition made, not null
- Attributes
Remarks
To be added.
Java reference for java.time.LocalTime.plus.
Applies to
Plus(Int64, ITemporalUnit)
Returns a copy of this time with the specified amount added.
[Android.Runtime.Register("plus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/LocalTime;", "", ApiSince=26)]
public Java.Time.Temporal.ITemporal? Plus(long amountToAdd, Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("plus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/LocalTime;", "", ApiSince=26)>]
abstract member Plus : int64 * Java.Time.Temporal.ITemporalUnit -> Java.Time.Temporal.ITemporal
override this.Plus : int64 * Java.Time.Temporal.ITemporalUnit -> Java.Time.Temporal.ITemporal
Parameters
- amountToAdd
- Int64
the amount of the unit to add to the result, may be negative
- unit
- ITemporalUnit
the unit of the amount to add, not null
Returns
a LocalTime based on this time with the specified amount added, not null
Implements
- Attributes
Remarks
Returns a copy of this time with the specified amount added. This returns a LocalTime, based on this one, with the amount in terms of the unit added. If it is not possible to add the amount, because the unit is not supported or for some other reason, an exception is thrown. If the field is a ChronoUnit then the addition is implemented here. The supported fields behave as follows: NANOS - Returns a LocalTime with the specified number of nanoseconds added. This is equivalent to plusNanos(long). MICROS - Returns a LocalTime with the specified number of microseconds added. This is equivalent to plusNanos(long) with the amount multiplied by 1,000. MILLIS - Returns a LocalTime with the specified number of milliseconds added. This is equivalent to plusNanos(long) with the amount multiplied by 1,000,000. SECONDS - Returns a LocalTime with the specified number of seconds added. This is equivalent to plusSeconds(long). MINUTES - Returns a LocalTime with the specified number of minutes added. This is equivalent to plusMinutes(long). HOURS - Returns a LocalTime with the specified number of hours added. This is equivalent to plusHours(long). HALF_DAYS - Returns a LocalTime with the specified number of half-days added. This is equivalent to plusHours(long) with the amount multiplied by 12. All other ChronoUnit instances will throw an UnsupportedTemporalTypeException. If the field is not a ChronoUnit, then the result of this method is obtained by invoking TemporalUnit.addTo(Temporal, long) passing this as the argument. In this case, the unit determines whether and how to perform the addition. This instance is immutable and unaffected by this method call.
Java reference for java.time.LocalTime.plus.