The Java Calendar getActualMinimum(int field) method returns the highest minimum value for the given calendar field of this Calendar instance.
DeclarationFollowing is the declaration for java.util.Calendar.getActualMinimum() method
public abstract int getActualMinimum(int field)Parameters
field − the given calendar field.
Return ValueReturns lowest maximum value of the given calendar field.
ExceptionNA
Getting Actual Minimum Year from a Current Dated GregorianCalendar Instance ExampleThe following example shows the usage of Java Calendar getActualMinimum() method. We're creating an instance of a GregorianCalendar of current date. Then we're getting actual minimum value of Year and printing it.
package com.tutorialspoint; import java.util.Calendar; import java.util.GregorianCalendar; public class CalendarDemo { public static void main(String[] args) { // create a calendar Calendar cal = new GregorianCalendar(); // print the actual min. for year field int result = cal.getActualMinimum(Calendar.YEAR); System.out.println("The minimum is: " + result); } }Output
Let us compile and run the above program, this will produce the following result −
The minimum is: 1Getting Actual Minimum Month from a Current Dated GregorianCalendar Instance Example
The following example shows the usage of Java Calendar getActualMinimum() method. We're creating an instance of a GregorianCalendar of current date. Then we're getting actual minimum value of Month using getActualMinimum() method and printing it.
package com.tutorialspoint; import java.util.Calendar; import java.util.GregorianCalendar; public class CalendarDemo { public static void main(String[] args) { // create a calendar Calendar cal = new GregorianCalendar(); // print the actual min. for month field int result = cal.getActualMinimum(Calendar.MONTH); System.out.println("The minimum is: " + result); } }Output
Let us compile and run the above program, this will produce the following result −
The minimum is: 0Getting Actual Minimum Day from a Current Dated GregorianCalendar Instance Example
The following example shows the usage of Java Calendar getActualMinimum() method. We're creating an instance of a GregorianCalendar of current date. Then we're getting actual minimum value of Day using getActualMinimum() method and printing it.
package com.tutorialspoint; import java.util.Calendar; import java.util.GregorianCalendar; public class CalendarDemo { public static void main(String[] args) { // create a calendar Calendar cal = new GregorianCalendar(); // print the actual min. for day field int result = cal.getActualMinimum(Calendar.DATE); System.out.println("The minimum is: " + result); } }Output
Let us compile and run the above program, this will produce the following result −
The minimum is: 1
java_util_calendar.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4