//获取当前月的第一天
function getFirstDayInCurrtMonth() {
var date = new Date()with (date) {
year = date.getYear() + 1900;
month = date.getMonth() + 1;
}
return year + "-" + month + "-1" + " 00:00:00";
}
//获取下个月的第一天
function getFirstDayInNextMonth() {
var date = new Date()with (date) {
year = date.getYear() + 1900;
month = date.getMonth() + 2;
}
return year + "-" + month + "-1" + " 00:00:00";
}
function getLastDayInCurrMonth() {
var date = new Date()
with (date) {
year = date.getYear() + 1900;
month = date.getMonth() + 1;
}
var day = new Date(year, month, 0);
return year + '-' + month + '-' + day.getDate() + " 23:59:59";//获取当月最后一天日期
}