Skip to content

Instantly share code, notes, and snippets.

@vejuhust
Created January 5, 2014 09:28
Show Gist options
  • Save vejuhust/8266225 to your computer and use it in GitHub Desktop.
Save vejuhust/8266225 to your computer and use it in GitHub Desktop.
List past 20 days
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from datetime import datetime
from datetime import timedelta
now = datetime.now()
delta_day = timedelta(days = -1)
for i in range(21):
now += delta_day
print now.strftime("%b %d, %Y %a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment