Year.IsSupported 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.
Overloads
| Name | Description |
|---|---|
| IsSupported(ITemporalField) |
Checks if the specified field is supported. |
| IsSupported(ITemporalUnit) |
Checks if the specified unit is supported. |
IsSupported(ITemporalField)
Checks if the specified field is supported.
[Android.Runtime.Register("isSupported", "(Ljava/time/temporal/TemporalField;)Z", "", ApiSince=26)]
public bool IsSupported(Java.Time.Temporal.ITemporalField? field);
[<Android.Runtime.Register("isSupported", "(Ljava/time/temporal/TemporalField;)Z", "", ApiSince=26)>]
abstract member IsSupported : Java.Time.Temporal.ITemporalField -> bool
override this.IsSupported : Java.Time.Temporal.ITemporalField -> bool
Parameters
- field
- ITemporalField
the field to check, null returns false
Returns
true if the field is supported on this year, false if not
Implements
- Attributes
Remarks
To be added.
Java reference for java.time.Year.isSupported.
Applies to
IsSupported(ITemporalUnit)
Checks if the specified unit is supported.
[Android.Runtime.Register("isSupported", "(Ljava/time/temporal/TemporalUnit;)Z", "", ApiSince=26)]
public bool IsSupported(Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("isSupported", "(Ljava/time/temporal/TemporalUnit;)Z", "", ApiSince=26)>]
abstract member IsSupported : Java.Time.Temporal.ITemporalUnit -> bool
override this.IsSupported : Java.Time.Temporal.ITemporalUnit -> bool
Parameters
- unit
- ITemporalUnit
the unit to check, null returns false
Returns
true if the unit can be added/subtracted, false if not
Implements
- Attributes
Remarks
Checks if the specified unit is supported. This checks if the specified unit can be added to, or subtracted from, this year. If false, then calling the plus(long, TemporalUnit) and minus methods will throw an exception. If the unit is a ChronoUnit then the query is implemented here. The supported units are: YEARS DECADES CENTURIES MILLENNIA ERAS All other ChronoUnit instances will return false. If the unit is not a ChronoUnit, then the result of this method is obtained by invoking TemporalUnit.isSupportedBy(Temporal) passing this as the argument. Whether the unit is supported is determined by the unit.
Java reference for java.time.Year.isSupported.