Day of the Week by pooq

r=io.read
g=math.floor
y=r"*n"
while y do m=r"*n"d=r"*n"if m<3 then m=m+12;y=y-1 end
print((y+g(y/4)-g(y/100)+g(y/400)+g(2.6*m+1.6)+d)%7)y=r"*n"end

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page