以下就是JS程式碼::
@ author YHC:
function getCurrentMonthmastDay(){ var minusDate=1000*60*60*24;
return new Date(nextMonthDayOne.getTime()-minusDate);
var current =new Date();
var currentMonth=current.getMonth();
var nextMonth= currentMonth;
Mon.Fate)d 🎜>
var minusDate=1000*60*60*24;
return new Date(nextMonthDayOne.getTime()-minusDate);
複製程式碼
程式碼如下:
function getCurrentMonthFirstDay(){ current.setDate(1);
return current;
}
function get current.setDate(1);
return current;
}