Also: January is not always the 1st month, sometimes it is the 0th.
1/1/2026 can be both Jan 1st, and Feb 1st.
For the downvoters, try it in your browser's terminal:
let test = new Date("1-1-2026");
console.log(`Year: ${test.getFullYear()}, Month: ${test.getMonth()}, Day: ${test.getDate()}`);
// Prints -> Year: 2026, Month: 0, Day: 1
//
***
---
***
---
***
---
***
---
// test.getFullYear() returns the year, but test.getYear() only returns the number of years since 1900
// test.getMonth() returns the month, but the first month is 0-indexed
// test.getDate() returns the day, 1-indexed, but test.getDay() returns the current day right now and not the day of the date object