This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hello! Thank you for coming to my aid This is my second python project and I am wondering if there is a better way to do this:
def dateCountdownReached():
today = datetime.date.today()
count = datetime.timedelta(30)
expiryDate = today count
#print('today is' , datetime.date.today())
#print('This account will expire on' , expiryDate)
if today == expiryDate:
return True
else:
return False
This program aims to countdown from the day it is initialized until a given number of days has passed. In this case that is 30 days. At the end of the 30 days I want this method to return false resulting in the termination of a program this will be used in. I also want to look into how to send an automated email to myself when this method returns false but that is a task for another day. Any help is much appreciated thank you!
Subreddit
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnprogra...