Java GregorianCalendar - isWeekDateSupported() Method
The java.util.GregorianCalendar.isWeekDateSupported() method returns true indicating this GregorianCalendar supports week dates.
Syntax
public final boolean isWeekDateSupported()
Parameters
No parameter is required.
Return Value
Returns true (always).
Exception
NA
Example:
In the example below, the java.util.GregorianCalendar.isWeekDateSupported() method returns true indicating the given GregorianCalendar supports week dates.
import java.util.*; public class MyClass { public static void main(String[] args) { //creating a Calendar object with specified date GregorianCalendar Cal = new GregorianCalendar(2015, 10, 25); //printing the Calendar System.out.println("The Calendar is: " + Cal.getTime()); //Printing whether the Calendar supports week dates System.out.println("Is Week Date Supported?: " + Cal.isWeekDateSupported()); } }
The output of the above code will be:
The Calendar is: Wed Nov 25 00:00:00 UTC 2015 Is Week Date Supported?: true
❮ Java.util - GregorianCalendar