DayOfWeek.Range(ITemporalField) 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.
Gets the range of valid values for the specified field.
[Android.Runtime.Register("range", "(Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange;", "", ApiSince=26)]
public Java.Time.Temporal.ValueRange? Range (Java.Time.Temporal.ITemporalField? field);
[<Android.Runtime.Register("range", "(Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange;", "", ApiSince=26)>]
abstract member Range : Java.Time.Temporal.ITemporalField -> Java.Time.Temporal.ValueRange
override this.Range : Java.Time.Temporal.ITemporalField -> Java.Time.Temporal.ValueRange
Parameters
- field
- ITemporalField
the field to query the range for, not null
Returns
the range of valid values for the field, not null
Implements
- Attributes
Remarks
Gets the range of valid values for the specified field.
The range object expresses the minimum and maximum valid values for a field. This day-of-week is used to enhance the accuracy of the returned range. If it is not possible to return the range, because the field is not supported or for some other reason, an exception is thrown.
If the field is ChronoField#DAY_OF_WEEK DAY_OF_WEEK
then the range of the day-of-week, from 1 to 7, will be returned. All other ChronoField
instances will throw an UnsupportedTemporalTypeException
.
If the field is not a ChronoField
, then the result of this method is obtained by invoking TemporalField.rangeRefinedBy(TemporalAccessor)
passing this
as the argument. Whether the range can be obtained is determined by the field.
Java documentation for java.time.DayOfWeek.range(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.