Year.From(ITemporalAccessor) Method

Definition

Obtains an instance of Year from a temporal object.

[Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/Year;", "", ApiSince=26)]
public static Java.Time.Year? From(Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/Year;", "", ApiSince=26)>]
static member From : Java.Time.Temporal.ITemporalAccessor -> Java.Time.Year

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the year, not null

Attributes

Remarks

Obtains an instance of Year from a temporal object. This obtains a year based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of Year. The conversion extracts the year field. The extraction is only permitted if the temporal object has an ISO chronology, or can be converted to a LocalDate. This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, Year::from.

Java reference for java.time.Year.from.

Applies to