public static ChronoLocalDateTime<?> from (TemporalAccessor temporal)

Obtains an instance of ChronoLocalDateTime from a temporal object.

This obtains a local date-time 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 chronology and the date-time from the temporal object. The behavior is equivalent to using Chronology.localDateTime(TemporalAccessor) with the extracted chronology. Implementations are permitted to perform optimizations such as accessing those fields that are equivalent to the relevant objects.

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

temporal    the temporal object to convert, not null

Returns:  the date-time, not null

DateTimeException    if unable to convert to a ChronoLocalDateTime

See also: