|
@ -254,7 +254,7 @@ function getYesterday(num, str){
|
|
|
function getLastHalfMonthArray(dateStr){//格式:2018-07
|
|
|
var dataArr = [],day,month,halfDate;
|
|
|
var data=new Date();
|
|
|
var year=dateStr.substring(0,4);
|
|
|
data.setFullYear(parseInt(dateStr.substring(0,4)));
|
|
|
data.setMonth(parseInt(dateStr.substring(5,7)))//获取到当前月份,设置月份
|
|
|
data.setMonth(data.getMonth()-6);//往前推半年,月份值减6
|
|
|
month = (data.getMonth()+1)<10?"0"+(data.getMonth()+1):data.getMonth()+1;
|