LocalDate.OfInstant(Instant, ZoneId) Method

Definition

Obtains an instance of LocalDate from an Instant and zone ID.

[Android.Runtime.Register("ofInstant", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/LocalDate;", "", ApiSince=34)]
public static Java.Time.LocalDate? OfInstant(Java.Time.Instant? instant, Java.Time.ZoneId? zone);
[<Android.Runtime.Register("ofInstant", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/LocalDate;", "", ApiSince=34)>]
static member OfInstant : Java.Time.Instant * Java.Time.ZoneId -> Java.Time.LocalDate

Parameters

instant
Instant

the instant to create the date from, not null

zone
ZoneId

the time-zone, which may be an offset, not null

Returns

the local date, not null

Attributes

Remarks

Obtains an instance of LocalDate from an Instant and zone ID. This creates a local date based on the specified instant. First, the offset from UTC/Greenwich is obtained using the zone ID and instant, which is simple as there is only one valid offset for each instant. Then, the instant and offset are used to calculate the local date.

Java reference for java.time.LocalDate.ofInstant.

Applies to