Calculate no of weeks between dates
I have a start date and an end date.
Start date is always a sunday and end date a saturday.
I have to calculate the no of weeks between the start date and end date.
I am confused about how to calculate when the enddate is in another year?
The maximum difference allowed is 26 weeks
I am using Calender.WeekofYear to calculate and then taking the differnce but this is giving wrong
I am not clear about the week of year calculation concept.
For a given year ,The no of weeks is 52 ,sometimes its 53 and the next years first week is sometimes
1st week or at times 52.
Can anyone please explain this concept of finding no of weeks.
Thanks in advance.