Calendar.PrepareGetActual(CalendarField, Boolean) 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.
Prepare this calendar for computing the actual minimum or maximum.
[Android.Runtime.Register("prepareGetActual", "(IZ)V", "GetPrepareGetActual_IZHandler", ApiSince=24)]
protected virtual void PrepareGetActual (Android.Icu.Util.CalendarField field, bool isMinimum);
[<Android.Runtime.Register("prepareGetActual", "(IZ)V", "GetPrepareGetActual_IZHandler", ApiSince=24)>]
abstract member PrepareGetActual : Android.Icu.Util.CalendarField * bool -> unit
override this.PrepareGetActual : Android.Icu.Util.CalendarField * bool -> unit
Parameters
- field
- CalendarField
- isMinimum
- Boolean
- Attributes
Remarks
Prepare this calendar for computing the actual minimum or maximum. This method modifies this calendar's fields; it is called on a temporary calendar.
Rationale: The semantics of getActualXxx() is to return the maximum or minimum value that the given field can take, taking into account other relevant fields. In general these other fields are larger fields. For example, when computing the actual maximum DAY_OF_MONTH, the current value of DAY_OF_MONTH itself is ignored, as is the value of any field smaller.
The time fields all have fixed minima and maxima, so we don't need to worry about them. This also lets us set the MILLISECONDS_IN_DAY to zero to erase any effects the time fields might have when computing date fields.
DAY_OF_WEEK is adjusted specially for the WEEK_OF_MONTH and WEEK_OF_YEAR fields to ensure that they are computed correctly.
Java documentation for android.icu.util.Calendar.prepareGetActual(int, boolean)
.
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.