themoosemind

http://math.stackexchange.com/q/460277/6876

Aug 6th, 2013
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. import datetime
  2.  
  3. d0 = datetime.date(1958, 8, 4)
  4. d1 = datetime.date(2013, 8, 4)
  5. delta = d1 - d0
  6. # Monday is 0 and Sunday is 6.
  7. print("%i days ago. Weekday was %s." % (delta.days, d0.weekday()))
Add Comment
Please, Sign In to add comment