Share via


ChronoField.Range Method

Definition

Gets the range of valid values for the field.

[Android.Runtime.Register("range", "()Ljava/time/temporal/ValueRange;", "", ApiSince=26)]
public Java.Time.Temporal.ValueRange? Range ();
[<Android.Runtime.Register("range", "()Ljava/time/temporal/ValueRange;", "", ApiSince=26)>]
abstract member Range : unit -> Java.Time.Temporal.ValueRange
override this.Range : unit -> Java.Time.Temporal.ValueRange

Returns

the range of valid values for the field, not null

Implements

Attributes

Remarks

Gets the range of valid values for the field.

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

This method returns the range of the field in the ISO-8601 calendar system. This range may be incorrect for other calendar systems. Use Chronology#range(ChronoField) to access the correct range for a different calendar system.

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.

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

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