//本周const date =newDate();const year = date.getFullYear();const month = date.getMonth();const day = date.getDate();const week = date.getDay();let start =newDate(year,month,day - week +1);let end =newDate(year,month,day - week +7);//上周const date =newDate();const year = date.getFullYear();const month = date.getMonth();const day = date.getDate();const week = date.getDay();let start =newDate(year, month, day - week -6);let end =newDate(year, month, day - week);//本月const date =newDate();const year = date.getFullYear();const mounth = date.getMonth();//0-11的数字,也就是说0=1月let start =newDate(year, mounth,1);let end =newDate(year, mounth +1,0);// new Date(2020,11,0);//表示是2020/12/1号的前一天,就是2020/11/30这天//上月const date =newDate();const year = date.getFullYear();const mouth = date.getMonth();let start =newDate(year, mouth -1,1);let end =newDate(year, mouth,0);// new Date(2020,11,0);//表示是2020/12/1号的前一天,就是2020/11/30这天//今年const date =newDate();const year = date.getFullYear();let start =newDate(year,0,1);let end =newDate(year +1,0,0);//去年const date =newDate();const year = date.getFullYear();let start =newDate(year -1,0,1);let end =newDate(year,0,0);//上半年const date =newDate();const year = date.getFullYear();let start =newDate(year -1,0,1);let end =newDate(year,6,0);//下半年const date =newDate();const year = date.getFullYear();let start =newDate(year -1,6,1);let end =newDate(year+1,0,0);//最近一周const end =newDate();const start =newDate();
start.setTime(start.getTime()-3600*1000*24*7);//近三个月const end =newDate();const start =newDate();
start.setTime(start.getTime()-3600*1000*24*90);