days between dates

1
2
3
4
5
6
7
from datetime import date
# add 1 to account for today as well
# 1982 days ago I started my blog (first post on 4 Jan 2009)
# Note: do not to add 0 in front of 1 or 4 (Month or Day)
# seems like python hates it that way..
#
(date.today() - date(2009, 1, 4)).days + 1