WeekFirstDay 返回本周第一天的时间
/***
* 本周第一天
* @return {*} WeekFirstDay 返回本周第一天的时间
*/
function showWeekFirstDay(){
let Nowdate=new Date();
let WeekFirstDay=new Date(Nowdate-(Nowdate.getDay()-1)*86400000);
return WeekFirstDay;
}
WeekLastDay 返回本周最后一天的时间
/***
* 本周最后一天
* @return {*} WeekLastDay 返回本周最后一天的时间
*/
function showWeekLastDay(){
let Nowdate=new Date();
let WeekFirstDay=new Date(Nowdate-(Nowdate.getDay()-1)*86400000);
let WeekLastDay=new Date((WeekFirstDay/1000+6*86400)*1000);
return WeekLastDay;
}