SHARE
TWEET

hlp

a guest Sep 22nd, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from datetime import datetime
  2.  
  3. date = input("Enter a date: ")
  4. dt = datetime.strptime(date, '%m/%d/%y')
  5. year = dt.year
  6. month = dt.month
  7. day = dt.day
  8.  
  9. n = int(input("Enter the number of dates(n): "))
  10.  
  11.  
  12. for n in range(1,n):
  13.     print(date)
  14.    
  15. y = year - int((14-month)//12)
  16.  
  17. k = y + int(y//4) - int(y//100) + int(y//400)
  18.  
  19. m = month + 12 * int((14-month)//12) - 2
  20.  
  21. d = (day + k + int((31*m)//12) - 2) %7
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top