Write python program to input date and show the how many remaning days in that month
Answers
Answered by
0
import time
def getDate():
year = int(input("Enter the year : "))
month = int(input("Enter the month : "))
day = int(input("Enter the day : "))
return (year, month, day)
def numberOfDaysBetweenTwoDatesTime():
date1 = getDate()
date2 = getDate()
time1 = time.mktime(date1 + (0,)*6)
time2 = time.mktime(date2 + (0,)*6)
timeo = time1 - time2
print('number of days between {} - {} : {}'.format(date1,
date2, timeo//(24 * 60 * 60)))
if __name__ == '__main__':
numberOfDaysBetweenTwoDatesTime()
Similar questions
Math,
6 months ago
Math,
6 months ago
Social Sciences,
6 months ago
Computer Science,
11 months ago
Physics,
1 year ago
English,
1 year ago