Dear coding gurus,
would you be so kind and tell me if this is possible in JavaScript to return the next date of given weekday (it could be either a number 0-6 or names Sunday-Saturday).
Example, if today, on 16-Oct-2009 I passed in:
- Friday, it would return today's date 16-Oct-2009
- Saturday returned 17-Oct-2009
- Thursday returned 22-Oct-2009
Thanks, I really hope to get an answer and people, who search for this kind of function on-line would end up here, since I haven't found anything else out there that solves this. This, indeed ain't rent-a-coder, because the solution is accessible to everyone for free! I don't think you need to comment if you don't know the answer, I do, however, appreciate your comments (@Andy & @Josh).