Instant.From(ITemporalAccessor) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Obtains an instance of Instant from a temporal object.
[Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/Instant;", "", ApiSince=26)]
public static Java.Time.Instant? From(Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/Instant;", "", ApiSince=26)>]
static member From : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Instant
Parameters
- temporal
- ITemporalAccessor
TemporalAccessor: the temporal object to convert, not null
Returns
the instant, not null
- Attributes
Remarks
Obtains an instance of Instant from a temporal object. This obtains an instant based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of Instant. The conversion extracts the INSTANT_SECONDS and NANO_OF_SECOND fields. This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, Instant::from.
Throws: DateTimeException if unable to convert to an Instant
Android reference for java.time.Instant.from.
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.