I have a date - 2015.05.20
What is the best way to calculate using python how much days left from today till this date?
from datetime import *
today = date.today()
future = date(2015,05,20)
???
import datetime
today = datetime.date.today()
future = datetime.date(2019,9,20)
diff = future - today
print (diff.days)
diff
is a timedelta object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With