To be fair to JavaScript, whilst it is a terrible language, the specifics of the Date API were almost certainly based on the designs of the Java Date class, which is possibly the worst class known to humankind.
Brendan has confirmed many times that they were instructed to copy the Java Date API exactly. Here's one:
https://brendaneich.com/2011/06/new-javascript-engine-module...
"Ken Smith, a Netscape acquiree from Borland, ported JDK 1.0-era java.util.Date (we both just drafted off of the Java truck, per management orders; we did not demur from the Y2K bugs in that Java class)."
http://stackoverflow.com/questions/1969442/whats-wrong-with-...