How many, of a given weekday there has been since the beginning of this
month?
I have a date, and I would like to find out how many, of this weekday,
there has been since the beginning of this month. (should be 1-5)
The reason I need this number is because I am telling customers I will
deliver something on "the 4rd Wednesday of the month" for example.
I do not need something that just returns the number of weeks it has been
starting from a predefined beginning day of week (every example I can find
does just that).
It may help to know that I have implemented the reverse of this code as
follows:
echo date('Y-m-d', strtotime("2013-08 4 Wedneday"));
//returns the 3rd Wednesday of the month namely "2013-08-28"
How can I get the "4" starting with "2013-08-28"?
No comments:
Post a Comment