Udostępnij za pośrednictwem


IChronology.LocalDateTime(ITemporalAccessor) Method

Definition

Obtains a local date-time in this chronology from another temporal object.

[Android.Runtime.Register("localDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoLocalDateTime;", "GetLocalDateTime_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.IChronoLocalDateTime? LocalDateTime (Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("localDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoLocalDateTime;", "GetLocalDateTime_Ljava_time_temporal_TemporalAccessor_Handler:Java.Time.Chrono.IChronology, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member LocalDateTime : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Chrono.IChronoLocalDateTime
override this.LocalDateTime : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Chrono.IChronoLocalDateTime

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the local date-time in this chronology, not null

Attributes

Remarks

Obtains a local date-time in this chronology from another temporal object.

This obtains a 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 ChronoLocalDateTime.

The conversion extracts and combines the ChronoLocalDate and the LocalTime from the temporal object. 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::localDateTime.

Java documentation for java.time.chrono.Chronology.localDateTime(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