i know using datetime.timedelta i can get the date of some days away form given date
daysafter = datetime.date.today() + datetime.timedelta(days=5)
but seems no datetime.timedelta(month=1)
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.
Of course there isn’t — if today’s January 31, what would be “the same day of the next month”?! Obviously there is no right solution, since February 31 does not exist, and the
datetimemodule does not play at “guess what the user posing this impossible problem without a right solution thinks (wrongly) is the obvious solution”;-).I suggest: