Skip to content

Instantly share code, notes, and snippets.

import sys
from datetime import date
def zeller(day, month, year):
if month==1 or month==2:
month+=12
year-=1
h = ( ( day +( (month+1) * 26 // 10)+ year +( year // 4)+ 6 * (year // 100)+ (year // 400)) % 7 )+6
return h%7