Sample code from Setting Dates in JavaScript at the JavaScript/Java site at BellaOnline.com
setDate()
sets the date (day of month) in an existing date object
EXAMPLE: now.setDate(12)     
setMonth()
sets the month in an existing date object
EXAMPLE: now.setMonth(2)     
setFullYear()
sets the year (4 digit form) in an existing date object
There is also an obsolete setYear() function, but it should be avoided whenever possible
EXAMPLE: now.setFullYear(2008)     
setHours()
sets the hours portion of the time of day in an existing date object (uses a 24 hour clock)
EXAMPLE: now.setHours(14)     
setMinutes()
sets the minutes portion of the time of day in an existing date object
EXAMPLE: now.setMinutes(17)     
setSeconds()
sets the seconds portion of the time of day in an existing date object
EXAMPLE: now.setSeconds(24)     
setMilliseconds()
sets the milliseconds portion of the time of day in an existing date object
EXAMPLE: now.setMilliseconds(300)     
setTime()
sets the date and time of an existing Date object using seconds since (before for negative numbers) January 1, 1970
EXAMPLE: now.setTime(-999999999)     


copyright 2007-2008 Julie L Baumler