Day of the Week by notogawa

m@main=getLine>>=print.f.map read.words>>m
f[y,m,d]=mod(a+a%4-a%100+a%400+(13*m+156*x+8)%5+d)7where x=0^m%3;a=y-x
(%)=div

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

download

return to the top page