Skip to content

Instantly share code, notes, and snippets.

@DoWhileGeek
Last active October 29, 2015 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DoWhileGeek/ad72327e4002084e7102 to your computer and use it in GitHub Desktop.
Save DoWhileGeek/ad72327e4002084e7102 to your computer and use it in GitHub Desktop.
Countdown to Star Wars: The Force Awakens
#!/usr/bin/env python
import datetime
def main():
now = datetime.datetime.utcnow()
movie_time = datetime.datetime(2015, month=12, day=18)
days = (movie_time - now).days
plural = ""
if days < 0:
print("Go watch Star Wars")
return
if days > 1:
plural = "s"
print("{} day{} to Star Wars".format(days, plural))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment