Originally Posted by
baliktad
...My psychic powers tell me that if you refresh the page after midnight local time, it will magically now be updated in January 2010! Heck, just change the time on your computer to any month you like and watch the updates come rolling in!...
Don't need psychic powers. For the geeks or merely geek-curious among us, here's the code behind the "magic:"
<script language="JavaScript" type="text/javascript">
<!--
function makeArray() {
for (i = 0; i<makeArray.arguments.length; i++)
this[i + 1] = makeArray.arguments[i];
}
var months = new makeArray('January','February','March','April','Ma y','June', 'July','August','September','October','November',' December');
var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(months[month] + " " + " " + year);
Doesn't do much for his credibility, IMHO.