Sdílet prostřednictvím


Month.IsSupported(ITemporalField) Method

Definition

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 month-of-year, false if not

Implements

Attributes

Remarks

Checks if the specified field is supported.

This checks if this month-of-year can be queried for the specified field. If false, then calling the #range(TemporalField) range and #get(TemporalField) get methods will throw an exception.

If the field is ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR then this method returns true. 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 documentation for java.time.Month.isSupported(java.time.temporal.TemporalField).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to