Given a date, how do you know the weekday position in the month (ex: third tuesday of the month) and how do you get the date for the same weekday for the next month (ex: third tuesday of the month+1)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the examples below,
dis adatetime.dateobject.To get the “index” of the day within the current month, use
This formula will work independent of what weekday the date actually is. To get the day wich is the same weekday with the same weekday index within the next month, the simplest way seems to be
This uses the fact the the date you are looking for is either 4 weeks or 5 weeks after
d.