Skip to content

Instantly share code, notes, and snippets.

@gmcclure
gmcclure / day_of_week_calc.py
Created November 12, 2012 00:43
Python routine for generating a 12-digit code that assists with determining the day of the week for any given date
#!/usr/bin/env python
import datetime, sys
try:
year = int(sys.argv[1])
except IndexError:
year = datetime.datetime.today().year
firstDayToFirstMonday = ['1st', '7th', '6th', '5th', '4th', '3rd', '2nd']