<h3>Perl, no date library: 160</h3> <pre>sub f{$_=@_[0];s/-//g;$d=0;$y=4;while(229+10000*$y<$_){$y+=4;$d+=5;if(!($y%100)&&$y%400){$y+=4;$d+=4;}}@r=(Sun,Mon,Tues,Wednes,Thurs,Fri,Satur);@r[$d%7]."day";}</pre> The real benefit of these date libraries is pushing off the length of the names of the days to someone else.