Language

LocalDateTime.MinusDays(Int64) Method

Definition

Returns a copy of this LocalDateTime with the specified number of days subtracted.

[Android.Runtime.Register("minusDays", "(J)Ljava/time/LocalDateTime;", "", ApiSince=26)]
public Java.Time.LocalDateTime? MinusDays(long days);
[<Android.Runtime.Register("minusDays", "(J)Ljava/time/LocalDateTime;", "", ApiSince=26)>]
member this.MinusDays : int64 -> Java.Time.LocalDateTime

Parameters

days
Int64

the days to subtract, may be negative

Returns

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

Attributes

Remarks

Returns a copy of this LocalDateTime with the specified number of days subtracted. This method subtracts the specified amount from the days field decrementing the month and year fields as necessary to ensure the result remains valid. The result is only invalid if the maximum/minimum year is exceeded. For example, 2009-01-01 minus one day would result in 2008-12-31. This instance is immutable and unaffected by this method call.

Java reference for java.time.LocalDateTime.minusDays.

Applies to