Document.LastModified Returns Invalid Date

ID: Q250316


The information in this article applies to:
  • Microsoft Internet Explorer versions 4.01 Service Pack 1, 4.01 Service Pack 2 for Windows 95
  • Microsoft Internet Explorer version 4.01 Service Pack 2 for Windows 98
  • Microsoft Internet Explorer versions 4.01 Service Pack 1, 4.01 Service Pack 2 for Windows NT 4.0


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:

http://windowsupdate.microsoft.com
The Mshtml.dll update is version 4.72.3713.600 and is designed to work with Internet Explorer 4.01 Service Pack 1 and Service Pack 2.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products 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> 

Additional query words:

Keywords : kbdisplay kbnetwork msiew95 msient msiew98
Version : WINDOWS:4.01 Service Pack 1,4.01 Service Pack 2
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 14, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.