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 JS is an evil language
@hecate @samwho true for me, i was scared. I didnt had fears until today 
@samwho my husband scored higher than I did
@cadey sounds like he already lost his mind? πŸ€ͺ
@samwho
@samwho This includes a few browser differences too, "12.0" "12.-1" are invalid dates on Firefox
@samwho (same for "maybe 1", "forth of may 2010" and onwards)

@krosylight @samwho To my understanding of the spec, almost all of this is unspecified implementation-defined behaviour, so it makes sense that browsers differ.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format

Date - JavaScript | MDN

JavaScript Date objects represent a single moment in time in a platform-independent format. Date objects encapsulate an integral number that represents milliseconds since the midnight at the beginning of January 1, 1970, UTC (the epoch).

MDN Web Docs
@geist @samwho I have removed some SpiderMonkey-specific behavior a few years ago, perhaps we should try removing this quirks from V8 too
@krosylight @samwho
which platform would give option 3 as the solution?
@hitsuyonai @krosylight It relies on whatever the local time zone is where the code is run, which was British summer time for me when I made this quiz.

@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

@samwho I work with JS every day and only got 12 ;_;

I have gleefully shared this with the entire dev community at my workplace~

@mvu @samwho

I never work with time in JS and got 8, which is about what you'd expect from random answers. The "ignore parenthesis" thing makes me think of RFC822 email parsing where that's how you specify a "comment" so <(ignored)*@(ignored)QAZ.WTF(ignored)> is the same as <*@qaz.wtf> (which will reach me). Later RFCs really try to reign in comments.

I'd also like to say the quiz really does not like my screen size.

@samwho @alpha i jumped on this quiz like there’s no tomorrow.
@samwho The font used in descriptions has no distinction between 0 and o, which is probably not a good choice here.
@samwho but temporal will be better, right? Right?
@samwho only a few questions in and I'm seething :O
@samwho 9/28, and I work in a project that does little else than date manipulation ^^'. We use temporal-polyfill from fullcalendar though
@samwho Considering yesterday I said this should be criminal, I'm not sure why you decided to admit today you made this. :D
@samwho Thanks, I got my yearly dose of "WTF" in just a few minutes 🫠
@samwho I'm not even going to post my result, too embarrassing.
@samwho this is soooo frustrating
@samwho Nope, not gonna torture myself with that. Dates in Javascript are absolutely fucked and always have been. So the less I have to encounter them the better.
@samwho Every correct answer brings you one step closer to insanity …
@samwho I don't know JavaScript at all.
@samwho This had me dying laughing, thank you
@samwho uh, I think my score is 2001-11-28 something
I knew JavaScript is weird, but I still underestimate how weird it can be.
@samwho I scored 7/28 on https://jsdate.wtf and all I got was this lousy text to share on social media.
new Date("wtf")

How well do you know JavaScript's Date class?

jsdate.wtf
@samwho
15/28. What the actual hell.
Lmao

Thank you @derickr for all your work on PHPs DateTime handling!!!!!

/cc @samwho

@samwho I hate this. Couldn't finish it made me nauseous. :D
@samwho I (11 correct) did better than GitHub Copilot (10 correct) but worse than most of my friends πŸ™ƒ
@samwho This is excellent torture! πŸ‘Œ
@samwho Wow, i hate js so muuch but i learnt it wooow  
@samwho you can enjoy 3 things: how flows water, how flames fire and how somebody fails to finish JS Date Parser Quiz