Example usage for java.util Calendar getMinimalDaysInFirstWeek

List of usage examples for java.util Calendar getMinimalDaysInFirstWeek

Introduction

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

Prototype

public int getMinimalDaysInFirstWeek() 

Source Link

Document

Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, this method returns 1.

Usage

From source file:Main.java

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

    // get what is the minimal days required in the first week
    int min = cal.getMinimalDaysInFirstWeek();
    System.out.println("Minimal Days in Week: " + min);

    // set the minimal days required in the first week
    cal.setMinimalDaysInFirstWeek(2);//from ww w.  j av  a2  s .com

    // print the result
    min = cal.getMinimalDaysInFirstWeek();
    System.out.println("Minimal Days in Week: " + min);
}

From source file:Main.java

public static void main(String[] args) {

    Calendar cal = Calendar.getInstance();

    // get what the minimal days required in the first week of the year 
    int i = cal.getMinimalDaysInFirstWeek();

    // print the result
    System.out.println("Minimal days required :" + i);
}