function getMonthBetween(startDate,endDate){ startDate=new Date(startDate.replace(/-/g,'/')); endDate=new Date(endDate.replace(/-/g,'/')); var num=0; var year=endDate.getFullYear()-startDate.getFullYear(); num+=year*12; var month=endDate.getMonth()-s…
//------[获取两个日期中所有的月份中] function getMonthBetween(start,end){ var result = []; var s = start.split("-"); var e = end.split("-"); var min = new Date(); var max = new Date(); min.setFullYear(s[0],s[1]); max.setFullYear(e[0],e[1]); console…