• kinttach@lemmy.zip
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    edit-2
    7 天前

    In the process of being replaced.

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal

    JavaScript has had the Date object for handling date and time since its first days. However, the Date API is based on the poorly designed java.util.Date class from Java, which was replaced in the early 2010s; but, because of JavaScript’s goal of backward compatibility, Date sticks around in the language.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      7 天前

      Hmm, I can believe that it was based on java.util.Date, but I don’t remember that being as unpredictable. I guess, a different API to begin with, would have avoided a lot of problems, though…