LocalDateTime.Minus Method

Definition

Overloads

Name Description
Minus(ITemporalAmount)

Returns a copy of this date-time with the specified amount subtracted.

Minus(Int64, ITemporalUnit)

Returns a copy of this date-time with the specified amount subtracted.

Minus(ITemporalAmount)

Returns a copy of this date-time with the specified amount subtracted.

[Android.Runtime.Register("minus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/LocalDateTime;", "", ApiSince=26)]
public Java.Time.LocalDateTime? Minus(Java.Time.Temporal.ITemporalAmount? amountToSubtract);
[<Android.Runtime.Register("minus", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/LocalDateTime;", "", ApiSince=26)>]
member this.Minus : Java.Time.Temporal.ITemporalAmount -> Java.Time.LocalDateTime

Parameters

amountToSubtract
ITemporalAmount

the amount to subtract, not null

Returns

a LocalDateTime based on this date-time with the subtraction made, not null

Attributes

Remarks

To be added.

Java reference for java.time.LocalDateTime.minus.

Applies to

Minus(Int64, ITemporalUnit)

Returns a copy of this date-time with the specified amount subtracted.

[Android.Runtime.Register("minus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/LocalDateTime;", "", ApiSince=26)]
public Java.Time.LocalDateTime? Minus(long amountToSubtract, Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("minus", "(JLjava/time/temporal/TemporalUnit;)Ljava/time/LocalDateTime;", "", ApiSince=26)>]
member this.Minus : int64 * Java.Time.Temporal.ITemporalUnit -> Java.Time.LocalDateTime

Parameters

amountToSubtract
Int64

the amount of the unit to subtract from the result, may be negative

unit
ITemporalUnit

the unit of the amount to subtract, not null

Returns

a LocalDateTime based on this date-time with the specified amount subtracted, not null

Attributes

Remarks

Returns a copy of this date-time with the specified amount subtracted. This returns a LocalDateTime, based on this one, with the amount in terms of the unit subtracted. If it is not possible to subtract the amount, because the unit is not supported or for some other reason, an exception is thrown. This method is equivalent to plus(long, TemporalUnit) with the amount negated. See that method for a full description of how addition, and thus subtraction, works. This instance is immutable and unaffected by this method call.

Java reference for java.time.LocalDateTime.minus.

Applies to