JavaScript Date Quirk

I ran into this today:

NaanCoder.png

I am sure it totally makes sense in the head of a programmer who wrote the JS interpreter, but I really find it odd. I mean look at this one:

New_Tab.png

When you pass 1 to the day, it’s the first day of the month, but when you pass 1 to the month, it’s the second month? 🤪