//计算180天后的日期
//180*24*60*60*1000
//更具时间戳计算n天前的日期
$(function () {
var timestamp =Date.parse(new Date());
var tenDayAgo=timestamp-15552000000;
var timeAgo =new Date(tenDayAgo);
var s2=timeAgo.getSeconds();
var yearAgo=timeAgo.getFullYear();
var monthAgo=timeAgo.getMonth()+1;
var dayAge=timeAgo.getDate();
var timeAgo2=yearAgo+"-"+monthAgo+"-"+dayAge
//180*24*60*60*1000
//更具时间戳计算n天前的日期
$(function () {
var timestamp =Date.parse(new Date());
var tenDayAgo=timestamp-15552000000;
var timeAgo =new Date(tenDayAgo);
var s2=timeAgo.getSeconds();
var yearAgo=timeAgo.getFullYear();
var monthAgo=timeAgo.getMonth()+1;
var dayAge=timeAgo.getDate();
var timeAgo2=yearAgo+"-"+monthAgo+"-"+dayAge
alert(timeAgo2)
});
});