Skip to content

Instantly share code, notes, and snippets.

@btbytes
Created June 3, 2010 01:27
Show Gist options
  • Select an option

  • Save btbytes/423292 to your computer and use it in GitHub Desktop.

Select an option

Save btbytes/423292 to your computer and use it in GitHub Desktop.
from datetime import datetime, timedelta
yesterday = (datetime.now() - timedelta(days=1)).strftime('%Y-%m-%d')
today = datetime.now().strftime('%Y-%m-%d')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment