how to get weekend based on date in javascript code example
Example: js date is weekend
var day = yourDateObject.getDay();
var isWeekend = (day === 6) || (day === 0); // 6 = Saturday, 0 = Sunday
var day = yourDateObject.getDay();
var isWeekend = (day === 6) || (day === 0); // 6 = Saturday, 0 = Sunday