I made a quiz about the JS Date parser. It's very easy and you will score very high.

https://jsdate.wtf

new Date("wtf")

How well do you know JavaScript's Date class?

jsdate.wtf

@samwho i make parsers and i have to wonder just what in the FUCK is going on in this one

the grammar sounds like it's even more nightmarish than that of c somehow

@SRAZKVT @samwho answer: JavaScript's Date API is ancient and modeled after another equally shitty Java API

all those quirky parsing behaviors are relics from the pre-standardization days of JS, back when every engine did whatever it wanted, and for backwards compat reason they had to keep it that way

feed it ISO 8601 and it will behave perfectly fine (or use the brand new Temporal API, but that's only available in Firefox rn)

If it matters, I'm a professional JavaScript/TypeScript developer specialized in JS, so I'm not talking out of my ass here, though this is pretty well-known (it's mentioned on the MDN article on the Temporal API)
@SRAZKVT @samwho in general all the shitty and inconsistent parts of JS that you see in funny online quizzes like this are relics of that old period

modern JS stuff tends to be very solid
@jessew @samwho and then there's those but for c where the answer is always "i don't know"
@jessew @samwho also i kinda guessed it was from ancient stuff, though i thought at the beginning all just copied netscape ? guess i thought wrong then
@SRAZKVT @samwho yeah netscape was pretty big, there were other vendors though

also it doesn't help that back then JS was designed as a small shitty scripting language, it wasn't the full-fledged programming language it was today, so they cut a few corners

also Java was really hype back then so they wanted to copy it for the same reason that everything has AI now (money by association with the hype thing)
@jessew @samwho if java wasn't popular we could have had scheme instead