以下就是JS代碼::
@ author YHC:
復制代碼 代碼如下:
function getCurrentMonthLastDay(){
var current=new Date();
var currentMonth=current.getMonth();
var nextMonth=++currentMonth;
var nextMonthDayOne =new Date(current.getFullYear(),nextMonth,1);
var minusDate=1000*60*60*24;
return new Date(nextMonthDayOne.getTime()-minusDate);
}
function getCurrentMonthLastDay(){
var current=new Date();
var currentMonth=current.getMonth();
var nextMonth=++currentMonth;
var nextMonthDayOne =new Date(current.getFullYear(),nextMonth,1);
var minusDate=1000*60*60*24;
return new Date(nextMonthDayOne.getTime()-minusDate);
}
復制代碼 代碼如下:
function getCurrentMonthFirstDay(){
var current=new Date();
current.setDate(1);
return current;
}
function getCurrentMonthFirstDay(){
var current=new Date();
current.setDate(1);
return current;
}
新聞熱點
疑難解答
圖片精選