function getDaysInMonth(year, month) {
return new Date(year, month, 0).getDate();
}
function getDayNamesInMonth(month, year) {
let date = new Date(year, month, 1);
let days = [];
while (date.getMonth() === month) {
days.push(new Date(date).toLocaleDateString('en-US', { weekday: 'short' }));
date.setDate(date.getDate() + 1);
}
return dayNames;
}