I would like to get the number of weeks in any given year. Even though 52 is accepted as a generalised worldwide answer, the calendars for 2015, 2020 and 2026 actually have 53 weeks.
Is there any way that I can calculate this, or any functions that will help me out?
getFirstDayOfWeek()andgetMinimalDaysInFirstWeek()methods are used in the calculation. If the "first day of the week" is specified as Monday for example and the "minimal days in first week" is 4 and the first Monday of the year is on 5th January, then the week preceding 5th January is classed as part of that year. - Adil Hussain