1982
No
const curDate =new Date(); const firstDay = new Date( curDate.getFullYear(), curDate.getMonth(), 1 ).getTime(); const lastDay = new Date( curDate.getFullYear(), curDate.getMonth() + 1, 0, 23, 59, 29 ).getTime(); console.log(" firstDay : lastDay ", firstDay, lastDay); const increaseMonth = () => { setCurDate( new Date(curDate.getFullYear(), curDate.getMonth() + 1, curDate.getDate()) ) } const decreaseMonth = () => { setCurDate( new Date(curDate.getFullYear(), curDate.getMonth() - 1, curDate.getDate()) ) }
diaryList.filter((it) => firstDay <= it.date && it.date <= lastDay)
댓글 ( 4)
댓글 남기기