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.
Value - this value is set as the minimal days required in first week.
Does not return value.
Does not throw Exception.
Example 1Test it Now
Today is :Wed Aug 15 18:29:43 PDT 2018 Minimal days in first week required :5
Example 2Test it Now
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