Created
January 5, 2013 01:04
-
-
Save mejarc/4458988 to your computer and use it in GitHub Desktop.
How many hours from now? A calculator for scheduling Buffer or Talentopoly posts. Relies on old-fashioned `raw_input`, but can be easily updated to Python 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from datetime import datetime | |
| now = datetime.now() | |
| print "Today is: ", now.strftime('%a, %d, %h %Y') | |
| how_many_days = raw_input("How many days from now should this post? ") | |
| print how_many_days | |
| how_many_hours = (int(how_many_days)) * 24 | |
| print "This is %d hours." % how_many_hours |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment