const isWeekday = (d: Date): boolean => d.getDay() % 6 !== 0; isWeekday(new Date(2022, 2, 10)); // -> true isWeekday(new Date(2021, 5, 8)); // -> false
const isWeekday = (d: Date): boolean => d.getDay() % 6 !== 0; isWeekday(new Date(2022, 2, 10)); // -> true isWeekday(new Date(2021, 5, 8)); // -> false