语言

OffsetDateTime.PlusDays(Int64) 方法

定义

返回此 OffsetDateTime 的副本,其中添加了指定的天数。

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

参数

days
Int64

要添加的天数,可能是负数

返回

基于此日期时间的 OffsetDateTime,添加日期,而不是 null

特性

注解

返回此 OffsetDateTime 的副本,其中添加了指定的天数。 此方法将指定金额添加到根据需要递增月份和年份字段的天字段,以确保结果保持有效。 仅当超出最大/最小年份时,结果才无效。 例如,2008-12-31 加上一天将导致 2009-01-01。 此实例不可变,不受此方法调用影响。

Java参考java.time.OffsetDateTime.plusDays。

适用于