• absentbird@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    4 days ago

    ISO 8601 is YYYYMMDD (or YYYY-MM-DD in extended format)

    Are you really going to wood chipper someone for leaving off the leading 20? I think we can safely infer the century and millennium with a high confidence, why not trade them for two extra name characters?

      • LousyCornMuffins@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        4 days ago

        are we just talking digital because i’ve inherited archives. my current one only goes back to the 1950s but in the next decades i expect to get some going back centuries.

      • absentbird@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 days ago

        Here you go gramps:

        (shortD) => {
            return parseInt(shortD.slice(0, 2), 10) > 50 ? "19" + shortD : "20"+shortD;
        }
        
        • 5C5C5C@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          4 days ago

          Did the software industry learn nothing from Y2K? Was it too long ago already for people to remember the mess we made for ourselves?

          Saving two characters in a file name is not worth the hell you are leaving in your trail by shoving this nonsense in an obscure corner of production code that people are going to forget about until it’s too late.

            • seralth@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              4 days ago

              And you assume that changes to filesystems, new filesystems being created or other such things won’t at some point create a edge case that creates a problem?

              When you could just be safe? Sounds stupid as fuck to me to blindly trust nothing will happen to create problems.

    • 5C5C5C@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      I recently had an accountant file something for the IRS that was dated as expiring in 1940 when it should’ve been 2040. I had to catch it myself after reading through 70 pages of dense forms before it was sent off, and I could’ve easily missed it.

      Digital records have existed long enough now that it’s downright irresponsible to leave off the century for anything where having an accurate date might even slightly matter.

      • absentbird@lemmy.world
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        4 days ago

        The exact date of creation is usually preserved in the filesystem, we’re just talking about what to name the documents themselves. The filename should be short and to the point, it gets truncated if it’s too long, and on windows you only have 260 characters for the entire path to the file plus the name.

        • 5C5C5C@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          If two characters are hurting your 260 character limit then you have other more serious problems to contend with.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      4 days ago

      So, was the time of murder 20th of October 2021 - 1:25 PM or 21st of October 2020 - 1:25 AM?

      Depending upon that, you may/may-not have an alibi.

      • absentbird@lemmy.world
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        4 days ago

        We’re just talking about the filename, the exact creation time is tracked by the OS. Plus I’d imagine most documents also have a time and date inside. The file name is mostly for sorting and human readability.

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          Oh, it was just filenames, not everything-everywhere?
          Then I guess it’s fine.

          What’s this date btw?
          10/8/10