Skip to content

Instantly share code, notes, and snippets.

@tonsmets
Created October 31, 2014 08:02
Show Gist options
  • Save tonsmets/b635edab5a9f557fd424 to your computer and use it in GitHub Desktop.
Save tonsmets/b635edab5a9f557fd424 to your computer and use it in GitHub Desktop.
import datetime
counter = 0;
for y in range(1900,2000):
for m in range(1, 13):
d = datetime.date(y,m,1)
if d.strftime("%A") == "Sunday":
counter = counter + 1
print "Sunday 1/" + str(m) + "/" + str(y)
print "Total sundays: " + str(counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment