Originally Posted by
syedbhai
Hello.
Check the name of the first day of the month. Based on that you will know whether its a partial week or full week. If its partial week you will know how many days. If its full then its 7 days. You will also know how many maximum days are there in that month.
After finishing with first week start increments of seven until you cross the maximum days. If you have crossed the maximum days then decrement by 7 and count the remaining days. Those will be the number of days for the last week.
Syed.
Thankyou so much for everyone's feedback. This did give me ideas how to solve the problem. Thanks rsinha