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;
}