IChronology.Range(ChronoField) Method

Definition

Gets the range of valid values for the specified field.

[Android.Runtime.Register("range", "(Ljava/time/temporal/ChronoField;)Ljava/time/temporal/ValueRange;", "GetRange_Ljava_time_temporal_ChronoField_Handler:Java.Time.Chrono.IChronologyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Time.Temporal.ValueRange? Range (Java.Time.Temporal.ChronoField? field);
[<Android.Runtime.Register("range", "(Ljava/time/temporal/ChronoField;)Ljava/time/temporal/ValueRange;", "GetRange_Ljava_time_temporal_ChronoField_Handler:Java.Time.Chrono.IChronologyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Range : Java.Time.Temporal.ChronoField -> Java.Time.Temporal.ValueRange

Parameters

field
ChronoField

the field to get the range for, not null

Returns

the range of valid values for the field, not null

Attributes

Remarks

Gets the range of valid values for the specified field.

All fields can be expressed as a long integer. This method returns an object that describes the valid range for that value.

Note that the result only describes the minimum and maximum valid values and it is important not to read too much into them. For example, there could be values within the range that are invalid for the field.

This method will return a result whether or not the chronology supports the field.

Java documentation for java.time.chrono.Chronology.range(java.time.temporal.ChronoField).

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