const firstDay = new Date(now.getFullYear(), now.getMonth(), 1); console.log(firstDay); // Sat Oct 01 2022 ... const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0); console.log(lastDay); // Mon Oct 31 2022 ...