Period.From(ITemporalAmount) 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 Period from a temporal amount.
[Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/Period;", "", ApiSince=26)]
public static Java.Time.Period? From(Java.Time.Temporal.ITemporalAmount? amount);
[<Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAmount;)Ljava/time/Period;", "", ApiSince=26)>]
static member From : Java.Time.Temporal.ITemporalAmount -> Java.Time.Period
Parameters
- amount
- ITemporalAmount
the temporal amount to convert, not null
Returns
the equivalent period, not null
- Attributes
Remarks
Obtains an instance of Period from a temporal amount. This obtains a period based on the specified amount. A TemporalAmount represents an amount of time, which may be date-based or time-based, which this factory extracts to a Period. The conversion loops around the set of units from the amount and uses the YEARS, MONTHS and DAYS units to create a period. If any other units are found then an exception is thrown. If the amount is a ChronoPeriod then it must use the ISO chronology.
Java reference for java.time.Period.from.