app.js 281 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 const today = new Date(); //오늘 날짜 입력 const holiday = new Date("2022-10-01"); //공휴일 날짜 입력 console.log(today.getMonth() + 1); const diffDate = today.getTime() - holiday.getTime(); const dday = Math.abs(diffDate / (1000 * 3600 * 24)); console.log(dday);