Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import datetime
- date = input("Enter a date: ")
- dt = datetime.strptime(date, '%m/%d/%y')
- year = dt.year
- month = dt.month
- day = dt.day
- n = int(input("Enter the number of dates(n): "))
- for n in range(1,n):
- print(date)
- y = year - int((14-month)//12)
- k = y + int(y//4) - int(y//100) + int(y//400)
- m = month + 12 * int((14-month)//12) - 2
- d = (day + k + int((31*m)//12) - 2) %7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement