getDateTwoMonthAfter:function(strDate){
var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) + ')');
var year = date.getFullYear();
var month = date.getMonth() + 3;
var day = date.getDate();
function numberPad(num){
return num < 10 ? '0' + num : num;
}
return year + "-" + numberPad(month) + "-" + numberPad(day);
},
JS 字符串格式日期转日期格式
最新推荐文章于 2024-07-05 00:30:00 发布