Javatpoint Logo
Javatpoint Logo

Java Calendar setMinimalDaysInFirstWeek() Method

The setMinimalDaysInFirstWeek() method of Calendar class is used to set the minimal days required in first week. The value which is to be set as minimal days in first week is passed as parameter.

Syntax

Parameter

Value - this value is set as the minimal days required in first week.

Returns

Does not return value.

Throws

Does not throw Exception.

Example 1

Test it Now

Output:

Today is :Wed Aug 15 18:29:43 PDT 2018
Minimal days  in first week required :5

Example 2

Test it Now

Output:

Today (Calendarobject) :Wed Aug 15 18:32:25 PDT 2018
 Today (GregorianCalendarobject) :Wed Aug 15 18:32:25 PDT 2018
both the calendar object require same Minimal days  in first week  9




Help Others, Please Share

facebook twitter pinterest