Computer Science, asked by dishars5880, 11 months ago

Write python program to input date and show the how many remaning days in that month

Answers

Answered by Anonymous
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