var interval = 1 * 24 * 60 * 60 * 1000;
myDate.setTime(myDate.getTime() - interval);
var s_begindate = myDate.format('Y-m-d');
var enddate = new Date();
var s_enddate = enddate.format('Y-m-d');
本文转自elbertchen 51CTO博客,原文链接:http://blog.51cto.com/linkyou/751924,如需转载请自行联系原作者