There would be a span of days-of-the-month for a Wednesday that is the 3rd Wednesday of the month. 15 â 21, I believe. If that is the right range, then it would be the same for any day of the week. So if the dat is >= 15 and <= 21 and the weedkday is that which represents Wednesday, then you are within your span.
If you think about it, if 1 is the date of the first Wednesday, then 14 will be the date of the tuesday before the 3rd Wednesday.
If 1 is the date of the first Thursday, the first Wednesday will be 6. the Wednesdays will be 7, 14, and 21. 15 is 1 higher, dodging therefore the 2nd Wednesday.
|