Skip to content

Instantly share code, notes, and snippets.

@eight
Created March 13, 2012 04:36
Show Gist options
  • Save eight/2026777 to your computer and use it in GitHub Desktop.
Save eight/2026777 to your computer and use it in GitHub Desktop.
#!/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