Day of the Week by Air Hadoken

((rec(y)(let*((r read)(x(r))(q quotient)(m modulo)(z zero?))(if(eof-object? x)0(and(print(m(+(- x(q x 100)1)(q x 4)(q x 400)(case(r)((1)(if(and(not(z(m x 100)))(z(m x 4)))6 0))((2)(if(z(m x 4))2 3))((9 12)5)((5)1)((10)0)((4 7)6)((8)2)((6)4)(else 3))(r))7))(y))))))

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

download

return to the top page