Calendar.getGreatestMinimum()

Date

Calendar.getGreatestMinimum(field) Highest Minimum possible value of the input field .

field : field for which the greatest minimum possible value is required, Example : DAY_OF_MONTH


Returns the highest minimum value .
package my_proj;
 
import java.util.Calendar;
 
public class my_first {
public static void main(String[] args) {
Calendar my_cal = Calendar.getInstance();// created calendar
my_cal.set(2020, 1, 25); // Year, month, date
System.out.println(my_cal.getGreatestMinimum(Calendar.DAY_OF_WEEK));//1
System.out.println(my_cal.getGreatestMinimum(Calendar.DAY_OF_MONTH));//1
System.out.println(my_cal.getGreatestMinimum(Calendar.DAY_OF_YEAR));//1
System.out.println(my_cal.getGreatestMinimum(Calendar.HOUR));//0
System.out.println(my_cal.getGreatestMinimum(Calendar.MINUTE));//0
System.out.println(my_cal.getGreatestMinimum(Calendar.AM_PM));//0
}
}
getLeastMaximum() getActualMaximum() Date & time tutorials



plus2net.com



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 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer