//当前时间
let currentTime = new Date();
//转换成周几
console.log('currentTime.getDay',currentTime.getDay());
//周六或者周日的判断条件
const isBetween=(currentTime.getDay()!=0&¤tTime.getDay()!=6)
//非周六周日与周六日
if(isBetween){
console.log('----00000');
}else{
console.log('----1111');
}
07-19
72
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-27
1615
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-30