js 判断给的日期是否为工作日
程序员文章站
2022-05-17 21:38:24
...
const isWeekday = (date) => date.getDay() % 6 !== 0;
console.log(isWeekday(new Date(2021, 0, 11)));
// Result: true (Monday)
console.log(isWeekday(new Date(2021, 0, 10)));
// Result: false (Sunday)
下一篇: 数据库中varchar和char的比较