My function is used to determine if a day falls on the weekend or not, and it works perfectly for most months except December. What could be causing this issue?
weekEnd: function(date) {
// Determine if it's a weekend
var date1 = new Date(date);
var day = date1.getDay();
var result = 1;
if (day === 6 || day === 0) {
result = 0;
}
return result;
},