>The application has to determine how many occurrences of a given day of the week occurred in a given calendar month.
>
>For example- How many Mondays (or any other specified day of the week) were there in February, 2016?
>I can see how to get the answer by looping through all the days in the month in question, but is there a slicker way?
Shouldn't be that hard, Bill
- Take the first day of the month
- Determine what day of the week it is, if not a Monday, advance n days until the first Monday of the month ( do not use a loop)
- Then see how many more days there are in that month
- integer division by 7
Gregory