Putting a Time Stamp on a Page : Date Calculation « Date Time « JavaScript DHTML






Putting a Time Stamp on a Page

   

<html> 
<head> 
<title>Time Stamper</title> 
</head> 
<body> 
<script type="text/javascript"> 
update = new Date(document.lastModified); 
theMonth = update.getMonth() + 1; 
theDate = update.getDate(); 
theYear = update.getFullYear(); 
document.writeln("<I>Last updated:" + theMonth + "/" + theDate + "/" + theYear + "<\/I>"); 
</script> 
</body> 
</html> 

   
    
    
  








Related examples in the same category

1.Calculate the days between two dates
2.Date Object Calculations
3.Get your timezone
4.Append date to string