Share via


ZoneOffset.OfHoursMinutes(Int32, Int32) Method

Definition

Obtains an instance of ZoneOffset using an offset in hours and minutes.

[Android.Runtime.Register("ofHoursMinutes", "(II)Ljava/time/ZoneOffset;", "", ApiSince=26)]
public static Java.Time.ZoneOffset? OfHoursMinutes (int hours, int minutes);
[<Android.Runtime.Register("ofHoursMinutes", "(II)Ljava/time/ZoneOffset;", "", ApiSince=26)>]
static member OfHoursMinutes : int * int -> Java.Time.ZoneOffset

Parameters

hours
Int32

the time-zone offset in hours, from -18 to +18

minutes
Int32

the time-zone offset in minutes, from 0 to &plusmn;59, sign matches hours

Returns

the zone-offset, not null

Attributes

Remarks

Obtains an instance of ZoneOffset using an offset in hours and minutes.

The sign of the hours and minutes components must match. Thus, if the hours is negative, the minutes must be negative or zero. If the hours is zero, the minutes may be positive, negative or zero.

Java documentation for java.time.ZoneOffset.ofHoursMinutes(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to