Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import datetime
  2.  
  3. t = datetime.datetime(2015,1,1) - datetime.datetime.now()
  4.  
  5. days, seconds = t.days, t.seconds
  6. hours = days * 24 + seconds // 3600
  7. minutes = (seconds % 3600) // 60
  8. seconds = seconds % 60
  9.  
  10. print(hours)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement