I just noticed that recently the javascript I was using to format and
display the last modified date of my web page is always reporting the
current date instead. It used to work fine. This is true both on the
university web server on which the page is hosted and the local mirror I
keep on my desktop (SuSE 8.2 Linux). It is a new university, but my
desktop filesystem is the same as before. I can see with "ls -l" that the
modified date of the file has not been changed. I am really befuddled! I
have tried several different scripts now, and they all show the same
behavior. Any clues about this?
Here's what I've been using:
// Formatted last-modified date
if (Date.parse(doc ument.lastModif ied) != 0) {
var modiDate = new Date(document.l astModified); var modiYear =
modiDate.getYea r();
modiYear = (modiYear < 2000) ? modiYear + 1900 : modiYear; var
monthName = new Array("January" , "February", "March", "April",
"May",
"June", "July", "August", "September" , "October", "November",
"December") ;
document.write( monthName[modiDate.getMon th()] + " ");
document.write( modiDate.getDat e() + ", " + modiYear); }
//
I call it like this:
<SCRIPT SRC="datemod.js " LANGUAGE="JavaS cript"></SCRIPT>
--John
display the last modified date of my web page is always reporting the
current date instead. It used to work fine. This is true both on the
university web server on which the page is hosted and the local mirror I
keep on my desktop (SuSE 8.2 Linux). It is a new university, but my
desktop filesystem is the same as before. I can see with "ls -l" that the
modified date of the file has not been changed. I am really befuddled! I
have tried several different scripts now, and they all show the same
behavior. Any clues about this?
Here's what I've been using:
// Formatted last-modified date
if (Date.parse(doc ument.lastModif ied) != 0) {
var modiDate = new Date(document.l astModified); var modiYear =
modiDate.getYea r();
modiYear = (modiYear < 2000) ? modiYear + 1900 : modiYear; var
monthName = new Array("January" , "February", "March", "April",
"May",
"June", "July", "August", "September" , "October", "November",
"December") ;
document.write( monthName[modiDate.getMon th()] + " ");
document.write( modiDate.getDat e() + ", " + modiYear); }
//
I call it like this:
<SCRIPT SRC="datemod.js " LANGUAGE="JavaS cript"></SCRIPT>
--John
Comment