Java Calendar setMinimalDaysInFirstWeek() MethodThe 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. SyntaxParameterValue - this value is set as the minimal days required in first week. ReturnsDoes not return value. ThrowsDoes not throw Exception. Example 1Test it NowOutput: Today is :Wed Aug 15 18:29:43 PDT 2018 Minimal days in first week required :5 Example 2Test it NowOutput: 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
Next TopicJava Calendar Class
|