Date Object Calculations : Number Data Type : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Number Data Type »

 

Date Object Calculations



<HTML>
<HEAD>
<TITLE>Date Calculation</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function nextWeek() {
    var todayInMS = today.getTime()
    var nextWeekInMS = todayInMS + (60 60 24 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>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Number Data Type