Skip to content

Instantly share code, notes, and snippets.

@gavinanderegg
Created January 26, 2012 23:27
Show Gist options
  • Save gavinanderegg/1685822 to your computer and use it in GitHub Desktop.
Save gavinanderegg/1685822 to your computer and use it in GitHub Desktop.
Python date
import datetime
now = datetime.datetime.now()
then = datetime.datetime(month=11, year=2009, day=9)
print now - then
# 808 days, 19:06:17.113214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment