getActualMonthMaximum()

Returns the maximum value that the Month field could have, taking into consideration the given time value and the current values of the getFirstDayOfWeek(), getMinimalDaysInFirstWeek(), and setTimeZone() methods.

Syntax

Numeric getActualMonthMaximum()

Usage

For example, return the maximum value of the Month field by calling:
Calendar.fromDate(Date.parseString("08/01/1999","mm/dd/yyyy")).getActualMonthMaximum()

This example populates a Decimal Format Box.

This method considers the given time value and the current values of the getFirstDayOfWeek(), getMinimalDaysInFirstWeek(), and setTimeZone() methods. For example, if the date of this instance is February 1, 2004, the actual maximum value of the Day of Month field is 29 because 2004 is a leap year, and if the date of this instance is February 1, 2005, it's 28.
Note:

This method calculates the maximum value of the field Week of Year based on the Year value, not the Week of Year. Call getWeeksInWeekYear() to get the maximum value of Week of Year in the week year of this calendar.