Day of the Week by 51b

File standardInput readLines map(split map(asNumber)do(y:=at(0);writeln((((at(1)+if(at(1)<3,y=y-1;18,6))*13/5|0)+y+(y/4|0)-(y/100|0)+(y/400|0)+at(2))%7)))

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

download

return to the top page