Period.Get(ITemporalUnit) 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.
Gets the value of the requested unit.
[Android.Runtime.Register("get", "(Ljava/time/temporal/TemporalUnit;)J", "", ApiSince=26)]
public long Get(Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("get", "(Ljava/time/temporal/TemporalUnit;)J", "", ApiSince=26)>]
abstract member Get : Java.Time.Temporal.ITemporalUnit -> int64
override this.Get : Java.Time.Temporal.ITemporalUnit -> int64
Parameters
- unit
- ITemporalUnit
the TemporalUnit for which to return the value
Returns
the long value of the unit
Implements
- Attributes
Remarks
Gets the value of the requested unit. This returns a value for each of the three supported units, YEARS, MONTHS and DAYS. All other units throw an exception.
Java reference for java.time.Period.get.