var dayOfTheWeek = function(day, month, year) {
if (month == 1) {
month = 13;
year--;
}
if (month == 2) {
month = 14;
year--;
}
let week = (day + 2 * month + 3 * Math.floor((month + 1) / 5) + year + Math.floor(year / 4) -Math.floor(year / 100) +Math.floor(year / 400) ) % 7;
return week;
};
tips
If you do not know or want to be friends of the students can micro-channel contact me: qq981145483 (Note: csdn algo)