Duration.Minus 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 |
|---|---|
| Minus(Int64, ITemporalUnit) |
Returns a copy of this duration with the specified duration subtracted. |
| Minus(Duration) |
Returns a copy of this duration with the specified duration subtracted. |
Minus(Int64, ITemporalUnit)
Returns a copy of this duration with the specified duration subtracted.
[Android.Runtime.Register("minus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/Duration;", "", ApiSince=26)]
public Java.Time.Duration? Minus(long amountToSubtract, Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("minus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/Duration;", "", ApiSince=26)>]
member this.Minus : int64 * Java.Time.Temporal.ITemporalUnit -> Java.Time.Duration
Parameters
- amountToSubtract
- Int64
the amount to subtract, measured in terms of the unit, positive or negative
- unit
- ITemporalUnit
the unit that the amount is measured in, must have an exact duration, not null
Returns
a Duration based on this duration with the specified duration subtracted, not null
- Attributes
Remarks
Returns a copy of this duration with the specified duration subtracted. The duration amount is measured in terms of the specified unit. Only a subset of units are accepted by this method. The unit must either have an exact duration or be ChronoUnit.DAYS which is treated as 24 hours. Other units throw an exception. This instance is immutable and unaffected by this method call.
Java reference for java.time.Duration.minus.
Applies to
Minus(Duration)
Returns a copy of this duration with the specified duration subtracted.
[Android.Runtime.Register("minus", "(Ljava/time/Duration;)Ljava/time/Duration;", "", ApiSince=26)]
public Java.Time.Duration? Minus(Java.Time.Duration? duration);
[<Android.Runtime.Register("minus", "(Ljava/time/Duration;)Ljava/time/Duration;", "", ApiSince=26)>]
member this.Minus : Java.Time.Duration -> Java.Time.Duration
Parameters
- duration
- Duration
the duration to subtract, positive or negative, not null
Returns
a Duration based on this duration with the specified duration subtracted, not null
- Attributes
Remarks
Returns a copy of this duration with the specified duration subtracted. This instance is immutable and unaffected by this method call.
Java reference for java.time.Duration.minus.