Calendar class getActualMinimum(int field)method example
Calendar class getActualMinimum(int field) method example. This example shows you how to use getActualMinimum(int field)method.This method Returns the minimum value that the specified calendar field could have, given the time value of this Calendar.
Here is the code:-
/**
* @Program that Returns the minimum value that the specified calendar field
* could have, given the time value of this Calendar
* getactualminimumcalender.java
* Author:-RoseIndia Team
* Date:-22-May-2008
*/
import java.util.*;
public class getactualminimumcalender {
public static void main(String[] args) {
//Creating a calender
Calendar cal = Calendar.getInstance() ;
// Returns the minimum value that the specified calendar field
//could have,
int i=cal.getActualMinimum(Calendar.MONTH);
System.out.println("The minimum month that the specified" +
" Calender have =" +i);
}
} |
Output of the program:-
| The minimum month that the specified Calender have =0 |
|