LocalDate.IsSupported Method

Definition

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 date, false if not

Implements

Attributes

Remarks

Checks if the specified field is supported. This checks if this date can be queried for the specified field. If false, then calling the range, get and with(TemporalField, long) methods will throw an exception. If the field is a ChronoField then the query is implemented here. The supported fields are: DAY_OF_WEEK ALIGNED_DAY_OF_WEEK_IN_MONTH ALIGNED_DAY_OF_WEEK_IN_YEAR DAY_OF_MONTH DAY_OF_YEAR EPOCH_DAY ALIGNED_WEEK_OF_MONTH ALIGNED_WEEK_OF_YEAR MONTH_OF_YEAR PROLEPTIC_MONTH YEAR_OF_ERA YEAR ERA All other ChronoField instances will return false. If the field is not a ChronoField, then the result of this method is obtained by invoking TemporalField.isSupportedBy(TemporalAccessor) passing this as the argument. Whether the field is supported is determined by the field.

Java reference for java.time.LocalDate.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 date. 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: DAYS WEEKS MONTHS 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.LocalDate.isSupported.

Applies to