• mkwarman@lemmy.world
    link
    fedilink
    arrow-up
    152
    arrow-down
    2
    ·
    1 year ago

    I’m definitely in the “for almost everything” camp. It’s less ambiguous especially when you consider the DD/MM vs MM/DD nonsense between US dates vs elsewhere. Pretty much the only time I don’t use ISO-8601 is when I’m using non-numeric month names like when saying a date out loud.

    • Dr. Wesker@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      22
      ·
      1 year ago

      Yeah, it’s pretty much everything for me too. The biggest exception being when UI is involved and a longhand date format would be more friendly.

    • slacktoid@lemmy.ml
      link
      fedilink
      English
      arrow-up
      18
      arrow-down
      1
      ·
      1 year ago

      And you can do a simple sort on the combined number and youve sorted by date.

    • usualsuspect191@lemmy.ca
      link
      fedilink
      arrow-up
      10
      ·
      1 year ago

      In Canada we use MM/DD and DD/MM so you never quite know which it is! There’s an expense spreadsheet I fill out for work that uses one format in one place and the other format in another…

      • flop_leash_973@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Hey, that sounds like my cloud storage providers auto billing system.

        “Your auto renewal will draft on 08/09/23.”

        Is that August 9th or September 8th? Literally depends on where the person you ask is in the world.

  • unomar@midwest.social
    link
    fedilink
    English
    arrow-up
    109
    arrow-down
    3
    ·
    1 year ago

    ISO-8601 over all other formats. 2023-08-09T21:11:00Z

    Simple, sortable, intuitive.

  • realbaconator@lemmy.world
    link
    fedilink
    arrow-up
    73
    arrow-down
    3
    ·
    1 year ago

    ISO 8601 gang. You’d never want to describe dates that way but for file management the convenience is massive.

      • gravitas_deficiency@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        10
        ·
        1 year ago

        In a programmatic context? Sure.

        In an “I want to be able to comprehend this by glancing at it” context: absolutely not.

        2023-08-10 15:45:33-04:00 is WAY more human legible than 1691696733.

      • railsdev@programming.dev
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        Whenever I’m passing a date from a website backend to frontend I’ll usually send it inside something like <span> then have JavaScript convert it to a string based on the browser’s localization settings.

        So many websites I see for error reporting, etc always throw everything out as UTC and it drives me crazy. It would be nice to just have an HTML tag for ISO-8601 (or even UNIX as done here).</span>

    • luciferofastora@discuss.online
      link
      fedilink
      arrow-up
      23
      ·
      11 months ago

      Together with hh:mm(:ss) for times and +hh:mm for timezones. Don’t make me deal with that 12am/pm bullshit that doesn’t make any sense, and don’t make make me look up just what the time difference is between CEST and IST. Just give me the offsets +02:00 and +05:30, and I can calculate that my local time of 06:55+03:30=10:25 in India.

  • corytheboyd@kbin.social
    link
    fedilink
    arrow-up
    37
    ·
    1 year ago

    Christ, do this many people really find iso8601 hard to read? It’s the date and the time with a T in the middle.

    • Cuttlefishcarl@sh.itjust.works
      link
      fedilink
      arrow-up
      19
      arrow-down
      4
      ·
      1 year ago

      Not “many people.” Americans. Americans find it hard to read. I’m not 100% sure but I’m fairly certain everyone else in the world agrees that either day/month/year or year/month/day is the best way to clearly indicate a date. You know, because big to small. America believes month/day/year for some stupid fucking reason.

      • pythonoob@programming.dev
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        1 year ago

        I’m pretty sure it’s because of the way we say it. Like, “May 6th, 2023”. So we write it 5/6/2023.

        That said, I think it’s fucking stupid.

        • Windows2000Srv@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I’m not an American and English isn’t my first language, so the US way to write dates always confused me. Now, I finally understand it! Many thanks, this is legitimately sooooo useful!

      • glockenspiel@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        2
        ·
        edit-2
        1 year ago

        America believes month/day/year for some stupid fucking reason.

        It’s because of Great Britain. We adopted it from them while a bunch of colonies and it regionally spread to others.

        America didn’t change, probably because we have been so geographically isolated (relatively speaking), whereas the modern day UK did change to be more like Europe.

        People get so goddamn hot and bothered by things that ultimately don’t matter almost like it is a culture war issue. Americans maintain the mm/dd/yyyy format because that’s how speak the dates.

        I wouldn’t say it is us Americans who “find it hard to read” if someone from elsewhere in the world sees an American date, knows we date things in the old way they used to date things, and then loses their minds over having to swap day for month. Everyone just wants to be contrarian and circle jerk about ISO and such.

        Us devs, on the other hand, absolutely should use the same format of yyyy-mm-dd plus time and time zone offset, as needed. There’s no reason, in this age, for dates to be culturally distinct in the tech space. Follow a machine-first standard and then convert just like we do with all other localizatons.

        But hey, if people want to be pedantic, let’s talk about archaic gendered languages which are completely useless and has almost zero consistency.

      • Pulptastic@midwest.social
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        Day/month/year is not in the same category as y/m/d. That crap is so ambiguous. Is today August 9th? Or September 8th? Y/m/d to the rescue.

      • pup_atlas@pawb.social
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I am an American and I use it religiously for the record. Especially for version numbers. Major.minor.year.month.day.hour.minute-commit. It sorts easy, is specific, intuitive, and makes it clear which version you’re using/working on.

    • Djtecha@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I think it’s fair that programmatic and human readable can be different. If someone is putting in the month word for a logging system they can fuck right off though

    • dilawar@lemm.eeB
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      As long as they use letter for months, like Jul 09, 2013 its fine. Otherwise prefer a sorted timescale version. Either slow changing to fast changing yyyy mm dd or fast to slow dd mm yyyy.

      • pomodoro_longbreak@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        The letters make no sense to me. Like Jul, Jun, I’m constantly mixing them up. Give me a good solid number like 07 or 10. No mixing that up. Higher numbers come after lower numbers, simple as.

  • cerberus@lemmy.world
    link
    fedilink
    English
    arrow-up
    35
    ·
    1 year ago

    ISO 8601 is amazing for data storage and standardizing the date.

    Display purposes sure, whatever you feel like

    But goddammit if you don’t use ISO 8601 to store dates, I will find you, and I will standardize your code.

    • snek_boi@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I actually need to standardize my code. I’ve got “learning F2” as something I want to do soon. The goal: use the exif data of my pictures to create [date in ISO 8601] - [original filename].[original file type termination]

      So a picture taken the third of march 2022 titled “asdf.jpg” would become “2022-3-3 - asdf.jpg”

      Help? lol

      • notabot@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        If you’re on Linux exiftool can get the creation date for you: exiftool -p '$CreateDate' -d '%Y-%m-%d' FILENAME, and you could run tgat in a loop over your files, something like:

        mkdir -p out
        for f in *.jpg
        do
        createdate=$(exiftool -p '$CreateDate' -d '%Y-%m-%d' "${f}")
        cp -p "${f}" "out/${createdate} - ${f}"
        done
        

        Obviously don’t justbgo running code some stranger just posted on the internet, especially as I haven’t tested it, but that should copy images from the current directory to a subdirectory called ‘out’ with the correct filenames.

        • metaStatic@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          ok I think I finally need to ask

          What the fuck is up with the html code? Ive seen this in a lot of posts and it just throws me every time.

          • notabot@lemm.ee
            link
            fedilink
            arrow-up
            4
            ·
            1 year ago

            I don’t see any HTML when I look at that comment from Lemmy, but kbin seems to make a real mess of rendering code blocks. Basically that bit had a few lines of code they could yse to do what they wanted.

      • Samsy@lemmy.mlOP
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I did this in the past and I would search through my notes… If I had notes ffs.

  • words_number@programming.dev
    link
    fedilink
    arrow-up
    35
    arrow-down
    2
    ·
    edit-2
    1 year ago

    I really wonder how americans were able to fuck this one up. There are three ways to arrange these and two of them are acceptable!

    Edit: Yes, I meant common ways, not combinatorically possible ways.

    • sift@lemmy.world
      link
      fedilink
      arrow-up
      13
      arrow-down
      2
      ·
      1 year ago

      It’s how the dates are typically said, here. November 6th, 2020 = 9/6/2020. (We basically never say the sixth of November. It sounds positively ancient.) It’s easy to use, but I agree that YYYY-MM-DD is vastly superior for organization.

      • Zagorath@aussie.zone
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        1 year ago

        We basically never say the sixth of November. It sounds positively ancient.

        When is your independence day, again?

        Anyway, in Australia (and, I suspect, other places that use DD/MM/YYYY) we use “{ordinal} of {month}” (11th of August), “{ordinal} {month}” (11th August), and “{month} {ordinal}” (August 11th) pretty much interchangeably. In writing but not in speaking, we also sometimes use “{number} {month}” (11 August). That doesn’t have any bearing on how we write it short form though, because those are different things. It’s not the defence many Americans seem to think it is of their insane method of writing the short form.

      • CoolMatt@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        I’m canadian and I’ve always prefered this format for the same reason. 11/6/23 is november 6th 2023, not the 11th of June 2023, that’s weird.

        • abraxas@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Except that mm/dd/yyyy and dd/mm/yyyy can be ambiguous, I definitely prefer the former if I’m not using an ISO date. But normally I just write ISO and my head translates to MMM dd,yyyy

      • yata@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        11 months ago

        It is a bit of a chicken and egg question though. Because do Americans not say it that way because of the date format or is that the date format because you don’t say it that way?

        Because in countries using DD.MM.YY we absolutely do say 6th of November.

        • duffman@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          That’s probably what happened. Though I do like starting with the larger context when talking about dates, but omitting it when talking about the current month or year.

      • azertyfun@sh.itjust.works
        link
        fedilink
        arrow-up
        15
        ·
        1 year ago

        Three ways that people actually use. YYYY-MM-DD, DD-MM-YYYY, and MM-DD-YYYY (ew).

        AFAIK no-one does YYYY-DD-MM, DD-YYYY-MM, or MM-YYYY-DD… yet. Don’t let the Americans know about these formats, they might just start using them out of spite.

        • naticus@lemmy.world
          link
          fedilink
          arrow-up
          12
          ·
          1 year ago

          I’ll avoid those at all cost and go with the new standard of YY-MM-DD-YY. What’s the date today? 20-08-10-23

          • luciferofastora@discuss.online
            link
            fedilink
            arrow-up
            16
            ·
            11 months ago

            What, 2023-223 for the 223rd day of the year 2023? That… is oddly appealing for telling the actual progress of the year or grouping. No silly “does this group have 31, 30, 29 or 28 members”, particularly the “is this year a multiple of four, but not of 100, unless it’s also a multiple of 400?” bit with leap days.

            You’ll have oddities still, no matter which way you slice it, because our orbit is mathematically imperfect, but it’s a start.

      • rmuk@feddit.uk
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        Twelve ways if you count two-digit years. My nephew was born on 12/12/12 which was convenient.

    • zagaberoo@beehaw.org
      link
      fedilink
      arrow-up
      1
      arrow-down
      4
      ·
      1 year ago

      Do people outside of the US not say dates like “June first” etc? M/D/Y matches that. It’s really not weird at all, even if the international ambiguity is awful.

      • tchotchony@mander.xyz
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        Flemish here (aka dutch-speaking). We say first June, sixth November etc. English isn’t our native language, so M/D/Y is weird as fuck and completely illogical to us.

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        1 year ago

        Yes it is objectively weird.

        When you write down “07/01/1967” are you unaware that it is unclear whether you’re referring to July 1st or January 7th?

        And despite the fact that you’re writing something down for the express purpose of communicating information, and you’re choosing to shorten it’s written format to save time and space, you’re ok with either

        a) just leaving it ambiguous and communicating poorly

        or

        b) having to write extra words to give it context, taking up more space than just writing out “July 1st, 1967”?

        1967/06/01 clearly communicates we’re starting with the year and going biggest to smallest time increments. There is no ambiguity as to which order it’s ever in, and it’s far shorter than the full written date.

        At a fundamental user experience level, it is objectively nonsensical to choose the American date format when your goals are 1) clearly communicating a date and 2) doing it shorter than writing out the words.

        • zagaberoo@beehaw.org
          link
          fedilink
          English
          arrow-up
          3
          ·
          11 months ago

          It’s not unclear to americans. “Objectively” is hilarious here. If it’s in the format people expect, then it’s perfectly fine in context. Sorry that US traditions don’t suit your fancy.

          It’s definitely confusing in an international context, but well-estsblished conventions don’t change easily.

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            edit-2
            11 months ago

            It’s not unclear to americans. “Objectively” is hilarious here. If it’s in the format people expect, then it’s perfectly fine in context. Sorry that US traditions don’t suit your fancy.

            Yes, if you chose the objectively wrong way of doing something and then tell everyone that you’re always going to do it the wrong way, then yes, people will expect you to do it the dumb way. Congratulations. That’s how choosing a protocol works. That doesn’t mean that some protocols aren’t objectively worse than others.

            It’s hilarious that you think “objective” is hilarious, given that you’re reasoning is based 100% on the subjective experiences of Americans.

            • zagaberoo@beehaw.org
              link
              fedilink
              English
              arrow-up
              1
              ·
              11 months ago

              That’s how formats work, I hate to break it to you. The ambiguity sucks, but the format itself makes perfect sense given the way americans say dates.

              • masterspace@lemmy.ca
                link
                fedilink
                English
                arrow-up
                0
                ·
                edit-2
                11 months ago

                The ambiguity sucks, but the format itself makes perfect sense given the way americans say dates.

                We all say dates the same.

                It’s objectively dumb because it’s the format that results in ambiguity. Again, the point that it’s good cause Americans are familiar with it is a subjective criteria, since it only applies to American’s experience with using it, whereas the ambiguity of an out of order time span is an objective one.

                • zagaberoo@beehaw.org
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  11 months ago

                  Only the combination of formats results in ambiguity. Neither format is ambiguous on its own.

                  Standardization is good, and if someone were to change it should probably be the US given the apparent worldwide consensus otherwise. That doesn’t make either format good or bad on its own.

                  What I take issue with is people acting like the US format is some kind of bizarro nonsense when it in fact makes perfect sense in terms of matching spoken dates. That is hardly a weird basis for a format.

                  Each has its tradeoffs, and which set of tradeoffs is better is a subjective matter. I agree that d/m/y makes the most sense for an international standard (if not y/m/d), but to claim that the US format itself is somehow objectively bad is silly.

  • SlopppyEngineer@discuss.tchncs.de
    link
    fedilink
    arrow-up
    34
    arrow-down
    1
    ·
    1 year ago

    YYYY-MM-DD for everything. My PC clock, my phone and even my handwritten notes all use that format.

    The only other acceptable format is military notation: DD MMM YYYY.

        • Samsy@lemmy.mlOP
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Yes spreadsheet apps like excel do this. If I remember correctly MMMM would write the full month. January.

        • Rodeo@lemmy.ca
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Considering how there’s almost no computers anymore with such limited resources that they can’t store a string or convert to one, it’s kind of crazy anybody bothers with the ambiguity of using numbers for the month.

          • scubbo@lemmy.ml
            link
            fedilink
            arrow-up
            0
            arrow-down
            1
            ·
            1 year ago

            The limited resource is not Compute Power, but Engineer time. Sure, you could ask someone to implement wrappers everywhere in the system so that the display is human-readable - or you could put one label somewhere clarifying the date format to readers.

            • Rodeo@lemmy.ca
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Implement wrappers everywhere? Why can’t they just write a single function that takes an ISO date a spits out a string (human readable) date? I’d put money down that such a function already exists in almost every library that deals with dates.

  • Jamie@jamie.moe
    link
    fedilink
    arrow-up
    30
    arrow-down
    1
    ·
    1 year ago

    I enforce ISO 8601 for the shared storage in my office. Before I got there, files were kinda stored in all kinds of formats, but mostly month first.

    I tell the person under me she can store her files in her user any way she wants, but if it goes into shared storage, it’s ISO 8601. I even have a folder in there called !Date format: YYYY-MM-DD Description to help anyone else remember.

    • Rootiest@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Haha I did the same.

      It was the Wild West, no standard, everyone used their own date format all in the same shared storage.

      I’ve got most of the office doing it correctly now

  • nave@lemmy.zip
    link
    fedilink
    arrow-up
    26
    ·
    1 year ago

    My 3rd grade teacher always made us write dates in YYYY-MM-DD for some reason.