How can I get the next date instead of today's date, should handle the month with 28 days like February. I don't want to get 32 December or 30 February :).
PS: sorry for my bad English, not my first language. Also, It's my first question.
My code here:
def yeartoday(self):
return datetime.datetime.utcnow().strftime('%Y')
def monthtoday(self):
return datetime.datetime.utcnow().strftime('%m')
def daytoday(self):
return datetime.datetime.utcnow().strftime('%d')
def informatdate1(self):
return "%s-%s-%s" % (self.yeartoday(), self.monthtoday(), self.daytoday())
def informatdate2(self):
return "%s|%s|%s" % (self.yeartoday(), self.monthtoday(), self.daytoday())