You can get the number of days in a specified month (ok)
https://stackoverflow.com/questions/13146418/find-all-the-days-in-a-month-with-date-object
const getAllDaysInMonth = (month, year) => Array.from({
length: new Date(year, month, 0).getDate()
},
(_, i) => new Date(year, month - 1, i + 1));
const allDatesInOctober = getAllDaysInMonth(3, 2022)
console.log(allDatesInOctober.map(x => x.toLocaleDateString([], { month: "numeric", day: "numeric" })))

PreviousaddDataToArray, cộng mảng đối tượng với điều kiện key == (ok)NextLấy giá trị khác nhau đầu tiên, cuối trong một mảng Object (ok)
Last updated
Was this helpful?