Day of the Week by murky-satyr

foreach {y m d} [read stdin] {if \$m<3 {incr y -1;incr m 12}
puts [expr ($d+($m*13+8)/5+$y+$y/4-$y/100+$y/400)%7]}

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

download

return to the top page