Example usage for java.util Calendar isLenient

List of usage examples for java.util Calendar isLenient

Introduction

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

Prototype

public boolean isLenient() 

Source Link

Document

Tells whether date/time interpretation is to be lenient.

Usage

From source file:Main.java

public static void main(String[] args) {
    Calendar cal = Calendar.getInstance();

    // print current state of lenient
    boolean b = cal.isLenient();
    System.out.println("Calendar is lenient :" + b);

    // change lenient state
    cal.setLenient(false);/*from   www. ja  va  2  s. c  o  m*/

    System.out.println("Lenient after setting :" + cal.isLenient());

}

From source file:Main.java

public static void main(String[] args) {

    Calendar cal = Calendar.getInstance();

    // tells whether date/time interpretation is lenient.
    boolean b = cal.isLenient();
    System.out.println(b);/*from  www  . j  a  va 2  s  . c  om*/
}