Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

1
Hello, I am new to python and am trying to make a program count down 30 days
Post Body

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!

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
6,125
Link Karma
3,675
Comment Karma
2,404
Profile updated: 5 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago