java.util.Calendar isWeekDateSupported()

Description :

This java tutorial shows how to use the isWeekDateSupported() method of Calendar class of java.util package. This method returns whether this Calendar supports week dates. The default implementation of this method returns false.

Method Syntax :

public boolean isWeekDateSupported()

Parameter Input :

 

DataType Parameter Description
N/A N/A N/A

 

Method Returns :

This method returns the minimal days required in the first week of the year.

Compatibility Version :

Requires Java 1.7 and up

Exception :

N/A

Java Code Example :

This java example source code demonstrates the use of isWeekDateSupported() method of Calendar class.

package com.javatutorialhq.java.examples;

import java.util.Calendar;

/*
 * This example source code demonstrates the use of  
 * isWeekDateSupported() method of Calendar class
 */

public class CalendarIsWeekDateSupportedExample {

	public static void main(String[] args) {

		// instantiate the calendar object
		Calendar cal = Calendar.getInstance();

		// check if this Calendar supports week dates
		boolean result = cal.isWeekDateSupported();
		System.out.println("Is calendar supports week date:" 
				+ result);
	}
}

Sample Output :

Running the isWeekDateSupported() method example source code of Calendar class will give you the following output:

Calendar isWeekDateSupported() method example

Calendar isWeekDateSupported() method example

Exception Scenario :

N/A

Similar Method :

  • N/A

Suggested Reading List :

References :