Java Calendar getWeeksInWeekYear() Method
The getWeeksInWeekYear() method of java.util.Calendar class returns the total number of weeks in a week year in the integer form.
No parameter is passed.
Returns the integer number of weeks in week year
UnsupportedOperationException: if any week number is not defined in the calendar.
Example 1Test it Now
Current Time:Thu Aug 09 16:36:58 PDT 2018 Weeks in week year :52 Changed Time:Fri Jun 07 16:36:58 PDT 1996 Weeks in week year :52
Example 2Test it Now
Week : 52 Weekayear : 1969 Year : 1969 Week : 52