Calendar.getLeastMaximum(field)Minimum of maximum possible value of the input field .

field : field for which the least maximum possible value is required, Example : DAY_OF_MONTH

Returns the least maximum value .

Sample script with output is here.
package my_proj;
import java.util.Calendar;
public class my_first {
public static void main(String[] args) {
Calendar my_cal = Calendar.getInstance();// created calendar

Here is the code to get YEAR and MONTH ( with output )
System.out.println( my_cal.getLeastMaximum(Calendar.MONTH));//11
System.out.println( my_cal.getLeastMaximum(Calendar.YEAR));//292269054
getActualMaximum() Date & time tutorials

Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 All rights reserved worldwide Privacy Policy Disclaimer