Here is my program:
import datetime
b=input()
a = datetime.date(b)-datetime.datetime.now().date()
print(a)
When I enter the date 2015,2,2
, or some another, I have a problem
Traceback (most recent call last):
File "", line 4, in <module>
a = datetime.date(b)-datetime.datetime.now().date()
TypeError: an integer is required
How to input the date right? I tried 2015-2-2
and 2015.2.2
and 2015-2-2
and other versions. But nothing works :(