Logo Search packages:      
Sourcecode: icu version File versions  Download package

int32_t Calendar::getActualMaximum ( EDateFields  field,
UErrorCode status 
) const [inherited]

Return the maximum value that this field could have, given the current date. For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar, for some years the actual maximum for MONTH is 12, and for others 13.

The version of this function on Calendar uses an iterative algorithm to determine the actual maximum value for the field. There is almost always a more efficient way to accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar overrides this function with a more efficient implementation.

field the field to determine the maximum of
status Fill-in parameter which receives the status of this operation.
the maximum of the given field for the current date of this Calendar
ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead.

Referenced by GregorianCalendar::getActualMaximum(), ChineseCalendar::offsetMonth(), Calendar::pinField(), Calendar::roll(), and CalendarRegressionTest::test4118384().

Generated by  Doxygen 1.6.0   Back to index