• pelya@lemmy.world
    link
    fedilink
    arrow-up
    512
    arrow-down
    1
    ·
    8 months ago

    YYYY-MM-DD is the only acceptable date format, as commanded by ISO 8601.

    • clif@lemmy.world
      link
      fedilink
      arrow-up
      81
      ·
      8 months ago

      “There shall be no other date formats before ISO8601. Remember this format and keep it as the system default”

    • Empricorn@feddit.nl
      link
      fedilink
      English
      arrow-up
      22
      ·
      8 months ago

      If you have years of files named similarly with the date, you will love the ISO standard and how it keeps things sorted and easy to read.

      • Agent641@lemmy.world
        link
        fedilink
        arrow-up
        19
        ·
        edit-2
        8 months ago

        I have autohotkey configured to insert the current date in ISO 8601 format into my filenames on keyboard shortcut for just this reason. So organized. So pure.

          • Agent641@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            edit-2
            7 months ago

            Download Autohotkey, and create a new script. Paste these shortcuts into the script and restart the script:

            #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

            ; #Warn ; Enable warnings to assist with detecting common errors.

            SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

            SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

            :R*?:ddd::

            FormatTime, CurrentDateTime, yyyy-MM-dd

            SendInput %CurrentDateTime%

            return

            :R*?:dtt::

            FormatTime, CurrentDateTime, yyMMddHHmm

            SendInput %CurrentDateTime%

            Return

            Now, if you type ‘ddd’ on your keyboard, the current date will be typed out, eg ‘2023-11-23’.

            If you type ‘dtt’ tgen the datetime stamp will be typed out in YYMMDDhhmm format, eg 2311231012

            There are so many cool things you van do with AHK to make your work more productive. For example, rather tgan typing your email address a billion times, add the shortcut:

            ::add1::[email protected]

            And then you can type ‘add1’ and hit space, and your email address will be typed out in full. Of course, the string ‘add1’ can be whatever you want.

        • Remavas@programming.dev
          link
          fedilink
          arrow-up
          5
          ·
          8 months ago

          (This doesn’t consider the separator) Cyan - DD/MM/YY Magenta - MM/DD/YY Yellow - YY/MM/DD The other ones are mixes of those two colors, so e.g. the US is MM/DD/YY and YY/MM/DD (apparently).

          Also just noticed I didn’t attribute this picture, I’ll edit my comment.

        • CoderKat@lemm.ee
          link
          fedilink
          English
          arrow-up
          4
          ·
          7 months ago

          We are ridiculously inconsistent in Canada. I’ve seen all 3 of the most popular formats here (2023-11-22, 11/22/2023, and 22/11/2023) in similarish amounts. Government forms seem to be increasingly using RFC 3339 dates, but even they aren’t entirely onboard.

      • umbraroze@kbin.social
        link
        fedilink
        arrow-up
        18
        ·
        8 months ago

        Funny thing, in ISO 8601 date isn’t separated by colon. The format is “YYYY-MM-DDTHH:MM:SS+hh:mm”. Date is separated by “-”, time is separated by “:”, date and time are separated by “T” (which is the bit that a lot of people miss). Time zone indicator can also be just “Z” for UTC. Many of these can be omitted if dealing with lesser precision (e.g. HH:MM is a valid timestamp, YYYY-MM is a valid datestamp if referring to just a month). (OK so apparently if you really want to split hairs, timestamps are supposed to be THH:MM etc. Now that’s a thing I’ve never seen anyone use.) Separators can also be omitted though that’s apparently not recommended if quick human legibility is of concern. There’s also YYYY-Wxx for week numbers.

        • velox_vulnus@lemmy.ml
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          edit-2
          8 months ago

          I love the nanosecond format! I was playing with the date command earlier and came across this.

      • Unaware7013@kbin.social
        link
        fedilink
        arrow-up
        5
        ·
        8 months ago

        This, but all run together.

        I write files/reports to disk a lot from scripts, so that’s my preferred format.

    • geissi@feddit.de
      link
      fedilink
      arrow-up
      9
      ·
      8 months ago

      For file names, absolutely.
      When I’m asking what date it is I typically know the current year.

        • seth@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          8 months ago

          In many of them but not all, because it’s become convention and has been enshrined in their documentation policies. cGMP just requires that your quality management system has a policy in place that specifies how to document the date, and when exceptions are allowed (for instance, data printouts where YYYY-MM-DD is often the default).

          It’s also the reason some labs require you to initial/date every page of printed data, and some only require you to initial/date the first and/or last page. I’ve seen FDA auditors be okay with both, as long as you can justify it with something like: our documentation policy defines the printout as a copy of the original data, and the original data as what’s stored on machine memory with electronic signature; versus: our documentation policy defines the original signed/dated data printout as the original data. In any case, it still has to follow 21 CFR part 11 requirements for electronic records & signatures, where the only date predicate rule example they give is 58.130(e), which itself is broad and only applies to non-clinical lab studies. It’s notable that the date format 21 CFR 11 itself uses is actually Month D, YYYY, with no zero padding on the day.

          And if you don’t have IQ/OQ/PQ documentation showing how you locked down and validated the software’s ability to maintain an audit trail you can’t even use electronic records (or signatures).