以下就是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;
}
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!