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. A new date standard?

A new date standard?

Scheduled Pinned Locked Moved The Lounge
csharpjavascriptdatabaselinqcom
49 Posts 19 Posters 2 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.
  • Sander RosselS Sander Rossel

    So I'm at this web shop and they have a product which is expected on "30-11--0001" (for Americans, that's the logical order of day-month--year). That's a pretty weird date, I'd expect 01-01-0001 or 01-01-1970 or even 01-01-1753 (the SQL min value), but never 30-11... The extra dash between the month and the year bothers me too, that's not a standard notation anywhere as far as I know. The best part though, is that I can pre-order the product, so apparently 30-11--0001 is a date in the future! And to make it worse, it's a best selling product, so they've already sold plenty. I can only draw one conclusion from all of this: this web shop is centuries, if not millennia, ahead of us (or at least they serve time travellers)! :omg: Is your software Y10K proof? :rolleyes:

    Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

    B Offline
    B Offline
    Bitbeisser
    wrote on last edited by
    #37

    My bet is simply on a lazy programmer who got something wrong in using existing data info...

    1 Reply Last reply
    0
    • M maze3

      I wait for when the relative date format becomes universal. Past, Now, Future. The is no value of things that happened in the past. Why waste time on when it was. Any event in the future either will or will not happen. When it happens it will be now. Now is the only time to focus on. (I have been on a bit of mental self actualisation last weekend)

      B Offline
      B Offline
      Bitbeisser
      wrote on last edited by
      #38

      So no more birthday presents and cake for you. Also, you don't get paid for the time you came in for work this morning, after all, all that counts is now... ;P

      1 Reply Last reply
      0
      • B Bassam Abdul Baki

        For RTL sorting DD-MM-YYYY makes sense. Not sure about the extra dash.

        Web - BM - RSS - Math - LinkedIn

        B Offline
        B Offline
        Bitbeisser
        wrote on last edited by
        #39

        Well, that's better than the stupid MM-DD-YYYY, but the only way you can properly sort is YYYY-MM-DDD

        B 1 Reply Last reply
        0
        • B Bitbeisser

          Well, that's better than the stupid MM-DD-YYYY, but the only way you can properly sort is YYYY-MM-DDD

          B Offline
          B Offline
          Bassam Abdul Baki
          wrote on last edited by
          #40

          In English yes, but in right-to-left (RTL) languages like Arabic, I think DD-MM-YYYY is the equivalent. Was the language English?

          Web - BM - RSS - Math - LinkedIn

          B 1 Reply Last reply
          0
          • B Bassam Abdul Baki

            In English yes, but in right-to-left (RTL) languages like Arabic, I think DD-MM-YYYY is the equivalent. Was the language English?

            Web - BM - RSS - Math - LinkedIn

            B Offline
            B Offline
            Bitbeisser
            wrote on last edited by
            #41

            I am not aware that the way numbers are written (and hence sorted) are different in those languages. AFAIK, multi digit numbers are actually written at least in Arabic left to right still...

            B 1 Reply Last reply
            0
            • B Bitbeisser

              I am not aware that the way numbers are written (and hence sorted) are different in those languages. AFAIK, multi digit numbers are actually written at least in Arabic left to right still...

              B Offline
              B Offline
              Bassam Abdul Baki
              wrote on last edited by
              #42

              As someone who knows Arabic, you are correct. As someone who has never used an Arabic keyboard for sorting, I would assume that sorting follows the language, which in this case is right to left. So DD-MM-YYYY would sort in the order of 78-56-1234 since the numbers are left to right, but higher precedence from right number to left.

              Web - BM - RSS - Math - LinkedIn

              H 1 Reply Last reply
              0
              • Mike HankeyM Mike Hankey

                Now that you mention it I have never seen or read a reference to year 0. Hmmm

                I may not be that good looking, or athletic, or funny, or talented, or smart I forgot where I was going with this but I do know I love bacon!

                H Offline
                H Offline
                Herbie Mountjoy
                wrote on last edited by
                #43

                The conspiracy theorists probably submit that the Vatican has deliberately done this in order to prevent the masses from learning the truth about whatever it is they might be hiding. We're philosophical about power outages here. A.C. come, A.C. go.

                Mike HankeyM 1 Reply Last reply
                0
                • B Bassam Abdul Baki

                  As someone who knows Arabic, you are correct. As someone who has never used an Arabic keyboard for sorting, I would assume that sorting follows the language, which in this case is right to left. So DD-MM-YYYY would sort in the order of 78-56-1234 since the numbers are left to right, but higher precedence from right number to left.

                  Web - BM - RSS - Math - LinkedIn

                  H Offline
                  H Offline
                  Herbie Mountjoy
                  wrote on last edited by
                  #44

                  In any case, why would you sort a date as a string? We're philosophical about power outages here. A.C. come, A.C. go.

                  K B 2 Replies Last reply
                  0
                  • H Herbie Mountjoy

                    In any case, why would you sort a date as a string? We're philosophical about power outages here. A.C. come, A.C. go.

                    K Offline
                    K Offline
                    kalberts
                    wrote on last edited by
                    #45

                    Is that a serious question? Obviously lots of lists and tables have date fields, or an entry is tagged by a date, which is represented as text, not as a binary date object. And frequently, you want to order the entries by date.

                    1 Reply Last reply
                    0
                    • H Herbie Mountjoy

                      In any case, why would you sort a date as a string? We're philosophical about power outages here. A.C. come, A.C. go.

                      B Offline
                      B Offline
                      Bassam Abdul Baki
                      wrote on last edited by
                      #46

                      Like M#### said, folder names, file names, and many other reasons to sort by date. For RTL languages, DD-MM-YYYY is the only way to do so, just like YYYY-MM-DD is for LTR (with or without hyphens).

                      Web - BM - RSS - Math - LinkedIn

                      H 1 Reply Last reply
                      0
                      • H Herbie Mountjoy

                        The conspiracy theorists probably submit that the Vatican has deliberately done this in order to prevent the masses from learning the truth about whatever it is they might be hiding. We're philosophical about power outages here. A.C. come, A.C. go.

                        Mike HankeyM Offline
                        Mike HankeyM Offline
                        Mike Hankey
                        wrote on last edited by
                        #47

                        I'm sure, all those lonely knights?

                        I may not be that good looking, or athletic, or funny, or talented, or smart I forgot where I was going with this but I do know I love bacon!

                        1 Reply Last reply
                        0
                        • B Bassam Abdul Baki

                          Like M#### said, folder names, file names, and many other reasons to sort by date. For RTL languages, DD-MM-YYYY is the only way to do so, just like YYYY-MM-DD is for LTR (with or without hyphens).

                          Web - BM - RSS - Math - LinkedIn

                          H Offline
                          H Offline
                          Herbie Mountjoy
                          wrote on last edited by
                          #48

                          Yes. I take your point. My issue is with a recent employer who insisted on storing dates as integers or strings or even decimals in his database. I can't remember seeing a single DateTime or Date object. See where I'm coming from? We're philosophical about power outages here. A.C. come, A.C. go.

                          1 Reply Last reply
                          0
                          • K kalberts

                            Mike Hankey wrote:

                            1 BCE?

                            or maybe 2 BCE? When Y2K was a hot topic, I was surprised to learn that the church (at least the protestant ones, but I assume that catholic ones agree, and then the other (Christian) ones follow suit) have a discontinuous time line: Year 1 BC is immediately followed by year 1 AD, with no intermediate year 0. So the question is if the time format used here has a year 0. We must assume that value 1 is AD (or if you like: CE), but is a value of 0 then 1 BC, and a value of -1 consequently 2 BC? Or is value 0 illegal? I was surprised to read in Wikipedia that the numerical value of AD/BC and CE are identical, with "400 BCE corresponds to 400 BC" explicitly given as an example. So the CE concept has adopted a discontinuous number line for labeling years. It is kind of curious that in an attempt to mark an independence from religion defined time scales, still we stick to a highly religion defined number line, rather than a mathematical one. Maybe it has to do with the zero being invented by the Arabs, and as we all know, their culture is not quite as we want it to be, so we reject it. What I am now waiting for is some (secular) standard that requires 1 = 3.

                            I Offline
                            I Offline
                            irneb
                            wrote on last edited by
                            #49

                            Member 7989122 wrote:

                            zero being invented by the ArabsIndians,

                            FTFY [Who Invented Zero?](https://www.livescience.com/27853-who-invented-zero.html) At least the first who actually used it as the zero concept we have today, instead of just a placeholder so they didn't confuse themselves when writing down a number.

                            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