Given a particular date, say 2011-07-02, how can I find the date of the next Monday (or any weekday day for that matter) after that date?
You can start adding one day to date object and stop when it's monday.
>>> d = datetime.date(2011, 7, 2) >>> while d.weekday() != 0: #0 for monday ... d += datetime.timedelta(days=1) ... >>> d datetime.date(2011, 7, 4)