programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sheldan to Programming · 16 hours ago

new Date("wtf")

jsdate.wtf

external-link
message-square
36
link
fedilink
  • cross-posted to:
  • [email protected]
  • [email protected]
147
external-link

new Date("wtf")

jsdate.wtf

Sheldan to Programming · 16 hours ago
message-square
36
link
fedilink
  • cross-posted to:
  • [email protected]
  • [email protected]
How well do you know JavaScript's Date class?
alert-triangle
You must log in or register to comment.
  • thenextguy@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    17 minutes ago

    Alright, enough making fun of languages that suck…let’s talk about JavaScript.

    https://www.destroyallsoftware.com/talks/wat

  • brb@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    4 hours ago

    Except for some reason “2” is interpreted as a month, and the year is set to 2001.

    Aight I’m out

  • FizzyOrange
    link
    fedilink
    arrow-up
    4
    ·
    6 hours ago

    Ha this is even worse than I could have imagined!

  • Mr. Satan@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    I scored 10/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

  • lunarul@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    10 hours ago

    If you’re not very familiar with JS, watch the Wat talk before taking the quiz to know what to expect from this wonderful language.

    • Lemminary@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      8 hours ago

      And then promptly get yourself familiar with how the language actually works. https://github.com/getify/You-Dont-Know-JS

      People who complain about JS often assume it has features of other languages and fail to realize it has its own architecture and winding history.

  • Sorse@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    12/28

    Surprised that I got this score when I only know python

  • MTK@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 hours ago

    This is just a good reminder of human nature to make bad choices (using JS) and stick with them forever.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    ·
    9 hours ago

    Nobody understands JavaScript. It’s the quantum mechanics of the software world.

  • tatterdemalion
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    8 hours ago

    Can we start a new web with a better language/platform already?

    • FizzyOrange
      link
      fedilink
      arrow-up
      2
      ·
      6 hours ago

      Google tried to do that with Dart, and failed. In fairness Dart 1 was much worse than Dart 2… So maybe that was a good thing because there’s no way they’d have been able to improve Dart as much as they have if it was part of the web.

      For dates there finally is something better anyway: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal

    • esa@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      There’s wasm if you need to target browsers.

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      7 hours ago

      Why? Why not improve JS (e.g. with Temporal), especially given how excellent Typescript is?

      • SheldanOP
        link
        fedilink
        arrow-up
        2
        ·
        51 minutes ago

        I wouldn’t call typescript excellent, if I did it would be on a very low standard.

        • FooBarrington@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          11 minutes ago

          It unquestionably is excellent. Can you name another language in common use with a type system that’s close to the expressiveness of Typescript?

      • tatterdemalion
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        6 hours ago

        JS is a lost cause.

        • FooBarrington@lemmy.world
          link
          fedilink
          arrow-up
          2
          arrow-down
          3
          ·
          6 hours ago

          How? It’s easy not to run into the common issues by using TS. What’s so bad about it that we should throw away the existing ecosystem?

          Please give arguments instead of platitudes.

  • fubarx@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    8 hours ago

    9/28. WTF’ing through 90% of the questions.

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    16
    ·
    12 hours ago

    I scored 13/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

    Oof. I’ve been a JS dev since 1998.

  • DrWorm@piefed.social
    link
    fedilink
    English
    arrow-up
    20
    ·
    13 hours ago

    The quirks in this quiz aren’t even universal, and vary based on which browser you’re using. See the table at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#non-standard_date_strings

    Also I got 13/28 😑

  • ragingHungryPanda@lemmy.zip
    link
    fedilink
    arrow-up
    19
    ·
    13 hours ago

    I got 10/28, but I was crying after the 7th question

  • Xylight@lemdro.id
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 hours ago

    I don’t like calling myself a JS/TS dev but my biggest project that I currently work on is written in it, so I had to try it.

    16/28. I mean it’s incredible how I can throw a diabolical amount of variations of formatting at it and somehow get valid dates.

  • schnurrito@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    7 hours ago

    7/28. Of course no one would ever do most of those things, they are interesting to think about but with little practical use.

Programming

programming

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 382 users / day
  • 1.17K users / week
  • 2.69K users / month
  • 7.54K users / 6 months
  • 2.78K local subscribers
  • 21.5K subscribers
  • 2.32K Posts
  • 37.1K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • MaungaHikoi@lemmy.nz
  • UlrikHD
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org