Get the range of valid values for this field using the temporal object to
refine the result.
!(p)
This uses the temporal object to find the range of valid values for the field.
This is similar to {@link #range()}, however this method refines the result
using the temporal. For example, if the field is {@code DAY_OF_MONTH} the
{@code range} method is not accurate as there are four possible month lengths,
28, 29, 30 and 31 days. Using this method with a date allows the range to be
accurate, returning just one of those four options.
!(p)
There are two equivalent ways of using this method.
The first is to invoke this method directly.
The second is to use {@link TemporalAccessor#range(TemporalField)}:
!(pre)
// these two lines are equivalent, but the second approach is recommended
temporal = thisField.rangeRefinedBy(temporal);
temporal = temporal.range(thisField);
</pre>
It is recommended to use the second approach, {@code range(TemporalField)},
as it is a lot clearer to read _in code.
!(p)
Implementations should perform any queries or calculations using the fields
available _in {@link ChronoField}.
If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
@param temporal the temporal object used to refine the result, not null
@return the range of valid values for this field, not null
@throws DateTimeException if the range for the field cannot be obtained
@throws UnsupportedTemporalTypeException if the field is not supported by the temporal
Get the range of valid values for this field using the temporal object to refine the result. !(p) This uses the temporal object to find the range of valid values for the field. This is similar to {@link #range()}, however this method refines the result using the temporal. For example, if the field is {@code DAY_OF_MONTH} the {@code range} method is not accurate as there are four possible month lengths, 28, 29, 30 and 31 days. Using this method with a date allows the range to be accurate, returning just one of those four options. !(p) There are two equivalent ways of using this method. The first is to invoke this method directly. The second is to use {@link TemporalAccessor#range(TemporalField)}: !(pre) // these two lines are equivalent, but the second approach is recommended temporal = thisField.rangeRefinedBy(temporal); temporal = temporal.range(thisField); </pre> It is recommended to use the second approach, {@code range(TemporalField)}, as it is a lot clearer to read _in code. !(p) Implementations should perform any queries or calculations using the fields available _in {@link ChronoField}. If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
@param temporal the temporal object used to refine the result, not null @return the range of valid values for this field, not null @throws DateTimeException if the range for the field cannot be obtained @throws UnsupportedTemporalTypeException if the field is not supported by the temporal