Language

OffsetTime.PlusHours(Int64) Method

Definition

Returns a copy of this OffsetTime with the specified number of hours added.

[Android.Runtime.Register("plusHours", "(J)Ljava/time/OffsetTime;", "", ApiSince=26)]
public Java.Time.OffsetTime? PlusHours(long hours);
[<Android.Runtime.Register("plusHours", "(J)Ljava/time/OffsetTime;", "", ApiSince=26)>]
member this.PlusHours : int64 -> Java.Time.OffsetTime

Parameters

hours
Int64

the hours to add, may be negative

Returns

an OffsetTime based on this time with the hours added, not null

Attributes

Remarks

Returns a copy of this OffsetTime with the specified number of hours added. This adds the specified number of hours to this time, returning a new time. The calculation wraps around midnight. This instance is immutable and unaffected by this method call.

Java reference for java.time.OffsetTime.plusHours.

Applies to