Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

crisss1205

macrumors 6502a
Original poster
Oct 7, 2008
959
306
NYC
Ok, I just recently upgraded to Safari 4.0.3 today and I cannot get the "last modified date" script working on my site. It worked fine in Safari 4.0.2 and Firefox but not Safari 4.0.3! I am using the "document.lastModified" method. Any ideas?
 
Can you elaborate on what kind of script as well as how you're using it?

This is the script I was using to show site visitors when the page was last updated.
Code:
<SCRIPT LANGUAGE="JavaScript">


var GM=new Date();

var month=new Array(12);
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";


function initArray() 
{
  this.length = initArray.arguments.length
  for (var i = 0; i < this.length; i++)
  this[i+1] = initArray.arguments[i]
}

var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var MOYArray = new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var LastModDate = new Date(document.lastModified);

document.write("Last updated on ");
document.write(DOWArray[(LastModDate.getDay()+1)],", ");
document.write(MOYArray[(LastModDate.getMonth()+1)]," ");
document.write(LastModDate.getDate(),", ",(LastModDate.getYear()+1900));
document.write(".");


</SCRIPT>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.