현재시간의 3개월전의 날짜를 얻고 싶을때...


var today = new Date();
var resultDate	= "";

resultDate = new Date(Date.parse(today) - 90 * 1000 * 60 * 60 * 24);
console.log(resultDate);

var stryyyy	= resultDate.getFullYear();
var strmm	= resultDate.getMonth()+1;
var strdd 	= resultDate.getDate();

resultDate = stryyyy + "-" + strmm + "-" + strdd;

console.log(resultDate);


결과)

Wed Dec 24 2014 14:57:47 GMT+0900 (대한민국 표준시)

2014-12-24