<HTML>
<HEAD>
<TITLE>Date Calculation</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function nextWeek() {
var todayInMS = today.getTime()
var nextWeekInMS = todayInMS + (60 * 60 * 24 * 7 * 1000)
return new Date(nextWeekInMS)
}
</SCRIPT>
</HEAD>
<BODY>
Today is:
<SCRIPT LANGUAGE="JavaScript">
var today = new Date();
document.write(today);
</SCRIPT>
<BR>
Next week will be:
<SCRIPT LANGUAGE="JavaScript">
document.write(nextWeek());
</SCRIPT>
</BODY>
</HTML>
|