I use the infamous jQuery UI Datepicker, and in my form I select a range of two dates.
First, the starting date is displayed, and the other is the end date.
Now I need to find algorthm, some tips and directions or helpers for calculating every Monday between the two dates.
For instance:
start: 2011-06-01 end: 2011-06-30
Take me these 4 (four) dates that are posted on Mondays:
1st: 2011-06-06 2nd: 2011-06-13 3rd: 2011-06-20 4th: 2011-06-27
How could I achieve this?
And also, I will need every two weeks on Monday:
The result for two weeks should be:
1st: 2011-06-06 2rd: 2011-06-20
source share