Udostępnij za pośrednictwem


Calendar.GetActualMaximum(CalendarField) Method

Definition

Returns the maximum value that the specified calendar field could have, given the time value of this Calendar.

[Android.Runtime.Register("getActualMaximum", "(I)I", "GetGetActualMaximum_IHandler")]
public virtual int GetActualMaximum (Java.Util.CalendarField field);
[<Android.Runtime.Register("getActualMaximum", "(I)I", "GetGetActualMaximum_IHandler")>]
abstract member GetActualMaximum : Java.Util.CalendarField -> int
override this.GetActualMaximum : Java.Util.CalendarField -> int

Parameters

field
CalendarField

the calendar field

Returns

the maximum of the given calendar field for the time value of this Calendar

Attributes

Remarks

Returns the maximum value that the specified calendar field could have, given the time value of this Calendar. For example, the actual maximum value of the MONTH field is 12 in some years, and 13 in other years in the Hebrew calendar system.

The default implementation of this method uses an iterative algorithm to determine the actual maximum value for the calendar field. Subclasses should, if possible, override this with a more efficient implementation.

Added in 1.2.

Java documentation for java.util.Calendar.getActualMaximum(.*int).

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