Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. We're not all in the US: Annual rant about dates

We're not all in the US: Annual rant about dates

Scheduled Pinned Locked Moved The Lounge
databasecloudjsonquestion
67 Posts 40 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Bruce Patin

    I once had to present dates on an 80-character green screen terminal and chose 03Jul22 as the shortest but most understandable form to all countries.

    C Offline
    C Offline
    Chris Maunder
    wrote on last edited by
    #45

    We use dd-MMM-yy but I still worry it's ambiguous. I played with dd-MMM-'yy to clarify but it just didn't seem right.

    cheers Chris Maunder

    1 Reply Last reply
    0
    • C Chris Maunder

      Why is it that so many sites - the latest being AWS's portal - refuse to understand that the only country in the world that uses MM/DD as a date format is the US. OK, and Belize. And Canadians when they are being accomodating and polite. But no one else. The rest of the world is looking at 07/03 thinking "7th of March?". I honestly don't understand why companies do this other than they straight out don't realise no one else does does dates like this. I've banned ambiguous dates at CodeProject and DeveloperMedia because when we need to get dates nailed down and the conversation includes an American, a Canadian and an Australian (not walking into a bar) the conversation falls apart quickly if we can't trust the date that's been written on the contract. Can we please, each of us, take a quick look at our code and maybe, just maybe, rethink how dates are presented. Here are some options: - IF you're tight on space then 3Jul is better than 03/07 and 07/03. And sure, we then run into language issues, but if your site is predominately english then your readers have far bigger issues. - 2022-07-03 is universal. Everyone gets that, even SQL. - 3-Jul-2022 is friendly and obvious. 3-Jul-'22 is shorter if you really need s pace. - 1656806400000 is accurate, unambiguous, precise to the millisecond. And fairly useless. Don't do this.

      cheers Chris Maunder

      K Offline
      K Offline
      Kirk 10389821
      wrote on last edited by
      #46

      I am stateside, and I really encourage people to use: YYYYMMDD as much as possible. Especially for filename prefixes. it's awesome, because it sorts wonderfully (sequentially), and is unambiguous. Having spent a lifetime with Oracle, I use 03-Jul-22 a LOT, as in code comments, etc. I feel your pain.

      1 Reply Last reply
      0
      • C Chris Maunder

        In my view heirarchical values like dates (or versions, or taxonomies etc) should be ordered in increasing or decreasing order, but never both. So year -> month -> day or day -> month -> year but never, ever, ever month -> day -> year. I don't think SQL is siding with anything other than a format that efficiently sorts. Not that SQL sorts dates based on a string representation...

        cheers Chris Maunder

        C Offline
        C Offline
        Cpichols
        wrote on last edited by
        #47

        S0, for July 3, 07/03 is okay by this standard, though 07/03/2022 would not be? Or 22/07/03 would work? As you suggested, maybe numbers should never be used for months in scheduling, because changing decades-old conventions never ends in anything but confusion. Jul3,22 | 3Jul,22 | 3Jul22 - none of these will end in confusion.

        C 1 Reply Last reply
        0
        • M Mike Winiberg

          As I've said elsewhere hereabouts - in over 40 years of writing software, the handling of dates has been the biggest single problem I have had to tackle. It's staggering that after all these years, date handling is still a (mostly lost, incorrect and misunderstood) black art to almost all software systems, including date handling libraries, developer frameworks and just about every piece of end user software and web page you come across. 8(

          C Offline
          C Offline
          Cpichols
          wrote on last edited by
          #48

          We just collect month, day, and year as separate data values and assemble them in processing, but that's mostly birth dates, so the calendar inputs are mostly an aggravation instead of a convenience. Another simple solution would be to make an onchange that adds a note containing the long-form of the entered date, or force the use of the calendar input.

          1 Reply Last reply
          0
          • C Chris Maunder

            Why is it that so many sites - the latest being AWS's portal - refuse to understand that the only country in the world that uses MM/DD as a date format is the US. OK, and Belize. And Canadians when they are being accomodating and polite. But no one else. The rest of the world is looking at 07/03 thinking "7th of March?". I honestly don't understand why companies do this other than they straight out don't realise no one else does does dates like this. I've banned ambiguous dates at CodeProject and DeveloperMedia because when we need to get dates nailed down and the conversation includes an American, a Canadian and an Australian (not walking into a bar) the conversation falls apart quickly if we can't trust the date that's been written on the contract. Can we please, each of us, take a quick look at our code and maybe, just maybe, rethink how dates are presented. Here are some options: - IF you're tight on space then 3Jul is better than 03/07 and 07/03. And sure, we then run into language issues, but if your site is predominately english then your readers have far bigger issues. - 2022-07-03 is universal. Everyone gets that, even SQL. - 3-Jul-2022 is friendly and obvious. 3-Jul-'22 is shorter if you really need s pace. - 1656806400000 is accurate, unambiguous, precise to the millisecond. And fairly useless. Don't do this.

            cheers Chris Maunder

            K Offline
            K Offline
            kmoorevs
            wrote on last edited by
            #49

            Chris Maunder wrote:

            2022-07-03 is universal. Everyone gets that, even SQL.

            :thumbsup: I couldn't agree more! This is what I use everywhere I have a choice. As someone else already mentioned, the sorting works with no special effort. :)

            "Go forth into the source" - Neal Morse "Hope is contagious"

            1 Reply Last reply
            0
            • G Gary Wheeler

              **<OldFartWarStory>** I rewrote a part of our application that generated a comma-separated value log for import into Excel. Instead of writing a human-readable date the Excel understand, the previous version wrote an integer. As it turns out, that integer was the number of seconds between January 1, 1900 00:00:00 and today's date at 00:00:00. To make matters worse, the time was a floating point value between 0.0 and 1.0, representing the time of day. After reverse engineering all this crap, I casually mentioned this to the engineer who used the log. He also took over for someone now departed. He told me that he never understood how the date and time values in the log worked, and didn't pay too much attention to them :doh: . I quietly showed him how to format the columns in the Excel spreadsheet as 'Date' and 'Time', and drank my dinner that evening. **</OldFartWarStory>**

              Software Zen: delete this;

              K Offline
              K Offline
              kmoorevs
              wrote on last edited by
              #50

              I can relate! One popular POS system we integrate with uses Julian dates (int number of days since 1900-01-01) everywhere in their db. It was a bit strange at first, but easily solved via dateadd. :)

              Gary Wheeler wrote:

              he never understood how the date and time values in the log worked, and didn't pay too much attention to them

              :wtf: :omg: :| Not much of an engineer then huh?

              "Go forth into the source" - Neal Morse "Hope is contagious"

              G 1 Reply Last reply
              0
              • K kmoorevs

                I can relate! One popular POS system we integrate with uses Julian dates (int number of days since 1900-01-01) everywhere in their db. It was a bit strange at first, but easily solved via dateadd. :)

                Gary Wheeler wrote:

                he never understood how the date and time values in the log worked, and didn't pay too much attention to them

                :wtf: :omg: :| Not much of an engineer then huh?

                "Go forth into the source" - Neal Morse "Hope is contagious"

                G Offline
                G Offline
                Gary Wheeler
                wrote on last edited by
                #51

                Actually he's a sharp guy, he just didn't have a pressing need for the date/time values.

                Software Zen: delete this;

                K 1 Reply Last reply
                0
                • G Gary Wheeler

                  Actually he's a sharp guy, he just didn't have a pressing need for the date/time values.

                  Software Zen: delete this;

                  K Offline
                  K Offline
                  kmoorevs
                  wrote on last edited by
                  #52

                  My apologies to your colleague for being presumptuous. :rose:

                  "Go forth into the source" - Neal Morse "Hope is contagious"

                  G 1 Reply Last reply
                  0
                  • K kmoorevs

                    My apologies to your colleague for being presumptuous. :rose:

                    "Go forth into the source" - Neal Morse "Hope is contagious"

                    G Offline
                    G Offline
                    Gary Wheeler
                    wrote on last edited by
                    #53

                    Oh trust me, there are plenty of engineers here who can create documentation in any app you like, as long as it's Excel :doh: .

                    Software Zen: delete this;

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      Why is it that so many sites - the latest being AWS's portal - refuse to understand that the only country in the world that uses MM/DD as a date format is the US. OK, and Belize. And Canadians when they are being accomodating and polite. But no one else. The rest of the world is looking at 07/03 thinking "7th of March?". I honestly don't understand why companies do this other than they straight out don't realise no one else does does dates like this. I've banned ambiguous dates at CodeProject and DeveloperMedia because when we need to get dates nailed down and the conversation includes an American, a Canadian and an Australian (not walking into a bar) the conversation falls apart quickly if we can't trust the date that's been written on the contract. Can we please, each of us, take a quick look at our code and maybe, just maybe, rethink how dates are presented. Here are some options: - IF you're tight on space then 3Jul is better than 03/07 and 07/03. And sure, we then run into language issues, but if your site is predominately english then your readers have far bigger issues. - 2022-07-03 is universal. Everyone gets that, even SQL. - 3-Jul-2022 is friendly and obvious. 3-Jul-'22 is shorter if you really need s pace. - 1656806400000 is accurate, unambiguous, precise to the millisecond. And fairly useless. Don't do this.

                      cheers Chris Maunder

                      S Offline
                      S Offline
                      SeattleC
                      wrote on last edited by
                      #54

                      Perhaps it's because we're conforming to the international standard, ISO 8601, that uses the format yyyy-mm-dd and we just shortened it to mm-dd. Of course, it might also be that we just don't care, and people who want to use the web sites we build just have to figure out which of the many nonstandard date/time formats we're using. When we really want to piss you off, we also use the English month names, for no better reason than because the site uses English. So don't push us or we'll switch to the Mayan calendar. Grrrr. Really, if that's the worst complaint you have about AWS, you are a pretty satisfied customer.

                      1 Reply Last reply
                      0
                      • C Charles Gallo

                        At least we don't use stones for people, MPH for speed limits while distances are in Km

                        A Offline
                        A Offline
                        Alister Morton
                        wrote on last edited by
                        #55

                        Where's that? Here in the UK, road sign distances are in miles and speed limits are in MPH.

                        1 Reply Last reply
                        0
                        • R RooN3y

                          Feel your pain with AWS. We have to set the culture code at the start of every Lambda we have because our main website sends dates in the british dd/mm/yyyy format and lambdas default to US format regardless of the region. The first 2 weeks of January where fun! I'm blaming AWS but to be honest it's probably the Linux image they use to spin up the lambda. But I don't want to blame Linux. Stupid AWS

                          E Offline
                          E Offline
                          englebart
                          wrote on last edited by
                          #56

                          Hear,hear!

                          1 Reply Last reply
                          0
                          • D Dan Neely

                            Chris Maunder wrote:

                            Can we please, each of us, take a quick look at our code and maybe, just maybe, rethink how dates are presented.

                            I've done this numerous times, and always reached similar conclusions to yours. The problem is ignoranus :elephant:ing :sunshine: clients, who refuse to acknowledge the existence of users from outside the US (in rare cases this has actually been a valid assumption) and insist on formatting it at 07/03 because that's the way they learned while snacking on crayons and paint chips, and anything else is too confusing or too hard or too weird or too...                                                                                             X| X| X| X| X|                         X| X| X| X| X| X|                             X| X| X| X| X| X| X| X| X|               X| X|                             X| X|                X| X| X| X| X| X| X| X| X| X| X| X|           X|                                                X|      X| X| X| X| X| X| X| X| X| X| X| X| X| X|      X|

                            E Offline
                            E Offline
                            englebart
                            wrote on last edited by
                            #57

                            I think your computer may have the Atari Centipede virus. Beware of spiders, fleas and scorpions!

                            1 Reply Last reply
                            0
                            • A Andreas Mertens

                              Remember, this is the same country that is still using the English system of measures, when almost everywhere else we use the Metric system... It is as if there is a need to proclaim that they are not like anyone else, all the time....

                              M Offline
                              M Offline
                              MSBassSinger
                              wrote on last edited by
                              #58

                              To correct your misunderstanding of the US, we do (and have) used both English and metric. I, like other kids of my generation, learned both in high school back in the 1960s. And I was raised in a small town/rural area. Americans really have no issue using both and switching between them.

                              A 1 Reply Last reply
                              0
                              • C Cpichols

                                S0, for July 3, 07/03 is okay by this standard, though 07/03/2022 would not be? Or 22/07/03 would work? As you suggested, maybe numbers should never be used for months in scheduling, because changing decades-old conventions never ends in anything but confusion. Jul3,22 | 3Jul,22 | 3Jul22 - none of these will end in confusion.

                                C Offline
                                C Offline
                                Chris Maunder
                                wrote on last edited by
                                #59

                                Yeah but the great thing with standards and conventions are that there are so many to choose from.

                                cheers Chris Maunder

                                1 Reply Last reply
                                0
                                • M MSBassSinger

                                  To correct your misunderstanding of the US, we do (and have) used both English and metric. I, like other kids of my generation, learned both in high school back in the 1960s. And I was raised in a small town/rural area. Americans really have no issue using both and switching between them.

                                  A Offline
                                  A Offline
                                  Andreas Mertens
                                  wrote on last edited by
                                  #60

                                  Actually, it all depends on what of the country you look at. I have lived and worked in the US, and have experienced this for myself. While I agree that the Metric system is taught (to some degree, again depending in what state yih are in), I have yet to see road signs in anything other than Miles or MPH. Or fluid measures - especially when the US usesUS gallons VS. Imperial gallons. Or weights. And so on. This isn't to say that metric measures aren't used in the US. At least in the scientific community they have embraced the Metric system as it is provides a consistent base with the rest if the scientific community. But as far as the average daily usage in America, I have yet to see it take hold. I am not looking to start a flame war with this. This is simply my own experiences and observations. I also admit that there are still some holdback's to the English system - specifically we still use acres instead of hectares. That would be more difficult to change and use as it would impact how to describe land usage (a fraction of a hectare vs. one acre). But for the most part we here in Canada have made the switch back in the 70s, and have pretty much given up on the English system with no regrets.

                                  1 Reply Last reply
                                  0
                                  • C CPallini

                                    I feel your pain. Since a long time, I am using the 3 Jul 2022 format.

                                    "In testa che avete, Signor di Ceprano?" -- Rigoletto

                                    R Offline
                                    R Offline
                                    Ralf Quint
                                    wrote on last edited by
                                    #61

                                    Why not make it crystal clear and use the ISO format 2022-07-03. Not possible to make mistakes reading it and as far as computer goes, this format sorts just perfectly fine...

                                    1 Reply Last reply
                                    0
                                    • Greg UtasG Greg Utas

                                      Visit Canada and you'll be disabused of the notion that the rest of the West hasn't allowed the insane to take over. Or New Zealand or Australia, for that matter. And that's not even mentioning the EU, which is almost beyond hope.

                                      Robust Services Core | Software Techniques for Lemmings | Articles
                                      The fox knows many things, but the hedgehog knows one big thing.

                                      R Offline
                                      R Offline
                                      Ralf Quint
                                      wrote on last edited by
                                      #62

                                      Sounds like a US of A caveman...

                                      1 Reply Last reply
                                      0
                                      • A Andreas Mertens

                                        Remember, this is the same country that is still using the English system of measures, when almost everywhere else we use the Metric system... It is as if there is a need to proclaim that they are not like anyone else, all the time....

                                        R Offline
                                        R Offline
                                        Ralf Quint
                                        wrote on last edited by
                                        #63

                                        Back to the Stone Age! Fred Flintstones units forever! LOL

                                        1 Reply Last reply
                                        0
                                        • F fgs1963

                                          United States - switching to the metric system... inch by inch.

                                          L Offline
                                          L Offline
                                          Luschan
                                          wrote on last edited by
                                          #64

                                          ...or foot by foot, or yard by yard, or finger by finger, or...anyone any more body parts?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups