Javascript Reference
Categories: Date

javascript Date setDate( )

@March 15, 2008, 1:22 a.m.
setDate( )Firefox/Netscape/NN 2 IE 3 ECMA 1  

setDate(dateInt)

  

Sets the date within the month for an instance of the Date object. If you specify a date beyond the end of the object's current month, the object recalculates the date in the succeeding month. For example, if a Date object is set to December 25, 2002, you can find out the calendar date ten days later with the following construction:

myDate.setDate(myDate.getDate( ) + 10);

After this calculation, the value of myDate is the equivalent of January 4, 2003.

 
Parameters
 
dateInt

Date integer.

 
Returned Value

New date in milliseconds.


Powered by Linode.