Document.LastModified Returns Invalid Date (250316)



The information in this article applies to:

  • Microsoft Internet Explorer 4.01 for Windows NT 4.0 SP 1
  • Microsoft Internet Explorer 4.01 for Windows NT 4.0 SP 2
  • Microsoft Internet Explorer 4.01 for Windows 98 SP 2
  • Microsoft Internet Explorer 4.01 for Windows 95 SP 1
  • Microsoft Internet Explorer 4.01 for Windows 95 SP 2

This article was previously published under Q250316

SYMPTOMS

When you view a Web site that contains JScript using Interenet Explorer 4.01 SP1 or SP2, the year 1900 may be displayed instead of 2000.

RESOLUTION

To resolve this issue, download the Microsoft Internet Explorer 4.0x Mshtml.dll Update from the following Microsoft Web site: The Mshtml.dll update is version 4.72.3525.600 and is designed to work with Internet Explorer 4.01 Service Pack 1 and Service Pack 2.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The variable document.lastModified returns two digits for the year, so that the following script returns 1900 for the year instead of 2000:
<SCRIPT LANGUAGE="Javascript">
<!--// 
var date = new Date(document.lastModified);
document.write("Last Updated:"+(date.getMonth()+1)+ "/" 
+ date.getDate()+ "/" + date.getFullYear() + ""); 
//--> 
</SCRIPT>
				

Modification Type:MinorLast Reviewed:9/23/2005
Keywords:kbHotfixServer kbQFE kbbug kbdisplay kbfix kbnetwork kbQFE KB250316