YearMonth.From(ITemporalAccessor) Method

Definition

Obtains an instance of YearMonth from a temporal object.

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

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the year-month, not null

Attributes

Remarks

Obtains an instance of YearMonth from a temporal object. This obtains a year-month based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of YearMonth. The conversion extracts the YEAR and MONTH_OF_YEAR fields. 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, YearMonth::from.

Java reference for java.time.YearMonth.from.

Applies to