setDate()

var myDate = new Date()
// assume myDate = Wed Aug 1 2001
var currDate = myDate.setDate(3)
var showDate = myDate
// showDate = Fri Aug 3 2001
var currDate = myDate.setDate(-32)
showDate = myDate
// showDate = Fri Jun 29 2001

Note:
The day of the week is automatically worked out by the system.

Close