Example usage for java.util Calendar getGreatestMinimum

List of usage examples for java.util Calendar getGreatestMinimum

Introduction

In this page you can find the example usage for java.util Calendar getGreatestMinimum.

Prototype

public abstract int getGreatestMinimum(int field);

Source Link

Document

Returns the highest minimum value for the given calendar field of this Calendar instance.

Usage

From source file:Main.java

public static void main(String[] args) {

    // create a calendar    
    Calendar cal = new GregorianCalendar(2010, 9, 15);

    // print the greatest min. for year field
    int result = cal.getGreatestMinimum(Calendar.YEAR);
    System.out.println("The minimum is: " + result);
}