Skip to content

Instantly share code, notes, and snippets.

@vieirin
Last active July 30, 2016 07:21
Show Gist options
  • Save vieirin/925dc29fbecb49709f38a310ae75c8a7 to your computer and use it in GitHub Desktop.
Save vieirin/925dc29fbecb49709f38a310ae75c8a7 to your computer and use it in GitHub Desktop.
from datetime import datetime, timedelta
lasttime = datetime.now()
#you're gonna save your previous date like this ^
tomorrow = lasttime + timedelta(days=1)
now = datetime.now()
if tomorrow <= now:
print('is already tomorrow!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment