Calculating 80 days from now
Checking when 80 days from the start of the project is¶
The first commit to github was done on 15th November 2014.
However, I had been working on the project for a couple of days by then, so I will take 13th November 2014 as the start date.
In [1]:
import datetime
In [2]:
start = datetime.date(2014, 11, 13)
start.isoformat()
Out[2]:
Now calculate 80 days from the start date
In [3]:
end = start + datetime.timedelta(days=80)
Check that the 80 days of coding ends on 1st February 2015
In [4]:
end.isoformat()
Out[4]:
What day of the week does the competition start on?
In [5]:
end.strftime("%A")
Out[5]:
How many days are we into the project?
In [6]:
today = datetime.date.today()
day = (today-start).days
print("Today is day %(day)d. %(togo)d days to go." % dict(day=day, togo=(80-day)))