JavaScript code to embed the data last modified into a web document

<!-- hide ...
update = new Date(document.lastModified)
theDate= update.getDate()
theMonth = update.getMonth() + 1
theYear = update.getYear() if (theYear < 1900) theYear += 1900
document.writeln ("last update: " + theMonth + "/" + theDate + "/" + theYear)
// -- End of JavaScript code -------------- -->