Created
March 13, 2012 04:36
-
-
Save eight/2026777 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import datetime | |
START_DAY = datetime.date(2010, 10, 20) | |
def nosmoking_days(todate = None): | |
if not todate: | |
todate = datetime.date.today() | |
delta = todate - START_DAY | |
return delta.days | |
if __name__=='__main__': | |
print(nosmoking_days()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment