PDA

View Full Version : Last Updated Script



13-08-1999, 08:08 AM
I have a two different 'last updated sripts' on web pages both work fine with IE5 and with Netscape 4 on my own computer files it is fine but once uploaded to the net Netscape displays it as January 01 1970 no matter what the correct date should be, your help would be appreciated.
The two scripts are as follows;

<script language='Javascript'>
<!--
document.write('This page was last updated on: '+document.lastModified+'')
//-->
</script>

<SCRIPT LANGUAGE='JavaScript'>
// <!--
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>

Thanks & Regards
Don Edgecombe