How to count occurrence of a day between two dates?
The code below helps you to find the number occurrence of a day between two specified date. The solution used below it to loop between the two dates and check if the weekday of those dates are equals to the day the occurrence we want to count.
The result of our program is:
Number mondays of between Sat Jan 01 13:48:51 CST 2000 and Thu Dec 31 13:48:51 CST 2009 are: 522