IChronology.ZonedDateTime Method

Definition

Overloads

ZonedDateTime(ITemporalAccessor)

Obtains a ChronoZonedDateTime in this chronology from another temporal object.

ZonedDateTime(Instant, ZoneId)

Obtains a ChronoZonedDateTime in this chronology from an Instant.

ZonedDateTime(ITemporalAccessor)

Obtains a ChronoZonedDateTime in this chronology from another temporal object.

[Android.Runtime.Register("zonedDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoZonedDateTime;", "GetZonedDateTime_Ljava_time_temporal_TemporalAccessor_Handler:Java.Time.Chrono.IChronology, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Java.Time.Chrono.IChronoZonedDateTime? ZonedDateTime (Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("zonedDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoZonedDateTime;", "GetZonedDateTime_Ljava_time_temporal_TemporalAccessor_Handler:Java.Time.Chrono.IChronology, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member ZonedDateTime : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Chrono.IChronoZonedDateTime
override this.ZonedDateTime : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Chrono.IChronoZonedDateTime

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the zoned date-time in this chronology, not null

Attributes

Remarks

Obtains a ChronoZonedDateTime in this chronology from another temporal object.

This obtains a zoned date-time in this chronology based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of ChronoZonedDateTime.

The conversion will first obtain a ZoneId from the temporal object, falling back to a ZoneOffset if necessary. It will then try to obtain an Instant, falling back to a ChronoLocalDateTime if necessary. The result will be either the combination of ZoneId or ZoneOffset with Instant or ChronoLocalDateTime. Implementations are permitted to perform optimizations such as accessing those fields that are equivalent to the relevant objects. The result uses this chronology.

This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, aChronology::zonedDateTime.

Java documentation for java.time.chrono.Chronology.zonedDateTime(java.time.temporal.TemporalAccessor).

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

ZonedDateTime(Instant, ZoneId)

Obtains a ChronoZonedDateTime in this chronology from an Instant.

[Android.Runtime.Register("zonedDateTime", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/chrono/ChronoZonedDateTime;", "GetZonedDateTime_Ljava_time_Instant_Ljava_time_ZoneId_Handler:Java.Time.Chrono.IChronology, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Java.Time.Chrono.IChronoZonedDateTime? ZonedDateTime (Java.Time.Instant? instant, Java.Time.ZoneId? zone);
[<Android.Runtime.Register("zonedDateTime", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/chrono/ChronoZonedDateTime;", "GetZonedDateTime_Ljava_time_Instant_Ljava_time_ZoneId_Handler:Java.Time.Chrono.IChronology, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member ZonedDateTime : Java.Time.Instant * Java.Time.ZoneId -> Java.Time.Chrono.IChronoZonedDateTime
override this.ZonedDateTime : Java.Time.Instant * Java.Time.ZoneId -> Java.Time.Chrono.IChronoZonedDateTime

Parameters

instant
Instant

the instant to create the date-time from, not null

zone
ZoneId

the time-zone, not null

Returns

the zoned date-time, not null

Attributes

Remarks

Obtains a ChronoZonedDateTime in this chronology from an Instant.

This obtains a zoned date-time with the same instant as that specified.

Java documentation for java.time.chrono.Chronology.zonedDateTime(java.time.Instant, java.time.ZoneId).

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