Java Calendar getMinimalDaysInFirstWeek() Method

The getMinimalDaysInFirstWeek() method returns required minimum days in integer form. The minimal days required in the first week of the year is passed into this method.

Syntax

Parameter

No parameter is passed.

Returns

Returns an integer value which is minimum days required in first week.

Throws

Does not throw exception.

Example 1

Output:

Today is :Wed Oct 23 14:35:20 PDT 1996
Minimal days required :1

Example 2

Output:

Today (Calendarobject) :Wed Aug 08 14:47:21 PDT 2018
 Today (GregorianCalendarobject) :Wed Aug 08 14:47:21 PDT 2018
both the calendar object require same Minimal days  in first week  1