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. Year Two Thousand One Bug

Year Two Thousand One Bug

Scheduled Pinned Locked Moved The Lounge
helpquestioncom
5 Posts 5 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 Offline
    B Offline
    Brit
    wrote on last edited by
    #1

    While following a link from the Joel on Software article, I found this: Year Two Thousand One Bug The year 2001 is the first year since 1931 when a 2-digit year could be confused with a day of the month. It's the first time since 1912 that a 2-digit year could be confused with a month. So, what is "01/02/03"? Is it January 2nd, 2003, February 3rd, 2001, or something else? (Six possible interpretations.) I recently encountered some code that tried and failed to convert "YY/MM/DD" data based on a "MM/DD/YY" format, from 1995 to 2000. Ironically, it always produced the correct result, because its error processing always silently reverted to the previously formatted data, which was correct. Now that "01/01/17" (January 17th, 2001) can be interpreted with the "MM/DD/YY" format (as January 1st, 2017), the program produces incorrect results... starting January 2nd, 2001. :wtf: http://c2.com/cgi/wiki?YearTwoThousandOneBug[^] In case anyone is interested in browsing, here's a list of various types of bugs: http://c2.com/cgi/like?YearTwoThousandOneBug[^] ------------------------------------------ The ousted but stubbornly non-dead leader reportedly released an audiotape this weekend, ending by calling on Iraqis to, quote, "resist the occupation in any way you can, from writing on walls, to boycotting, to demonstrating and taking up arms." adding, "you know, pretty much anything I used to kill you for." - The Daily Show

    C D P 3 Replies Last reply
    0
    • B Brit

      While following a link from the Joel on Software article, I found this: Year Two Thousand One Bug The year 2001 is the first year since 1931 when a 2-digit year could be confused with a day of the month. It's the first time since 1912 that a 2-digit year could be confused with a month. So, what is "01/02/03"? Is it January 2nd, 2003, February 3rd, 2001, or something else? (Six possible interpretations.) I recently encountered some code that tried and failed to convert "YY/MM/DD" data based on a "MM/DD/YY" format, from 1995 to 2000. Ironically, it always produced the correct result, because its error processing always silently reverted to the previously formatted data, which was correct. Now that "01/01/17" (January 17th, 2001) can be interpreted with the "MM/DD/YY" format (as January 1st, 2017), the program produces incorrect results... starting January 2nd, 2001. :wtf: http://c2.com/cgi/wiki?YearTwoThousandOneBug[^] In case anyone is interested in browsing, here's a list of various types of bugs: http://c2.com/cgi/like?YearTwoThousandOneBug[^] ------------------------------------------ The ousted but stubbornly non-dead leader reportedly released an audiotape this weekend, ending by calling on Iraqis to, quote, "resist the occupation in any way you can, from writing on walls, to boycotting, to demonstrating and taking up arms." adding, "you know, pretty much anything I used to kill you for." - The Daily Show

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      :wakes up: Y2K Bugs! :wtf: :wtf: They're still around. Geez I thought we got rid of all them bastards years ago. Seriously, if somebody in this day and age is still working with 2 digit years and assuming some century value, they are just so deserving of all the problems that incurrs. Ultimately, the underlying problem is a date format problem and that baby is probably never going to go away. Y2K was just a subset of that, albeit a vary large and expensive one. Chris Meech It's much easier to get rich telling people what they want to hear. Chistopher Duncan I can't help getting older, but I refuse to grow up. Roger Wright I've been meaning to change my sig. Thanks! Alvaro Mendez We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton

      1 Reply Last reply
      0
      • B Brit

        While following a link from the Joel on Software article, I found this: Year Two Thousand One Bug The year 2001 is the first year since 1931 when a 2-digit year could be confused with a day of the month. It's the first time since 1912 that a 2-digit year could be confused with a month. So, what is "01/02/03"? Is it January 2nd, 2003, February 3rd, 2001, or something else? (Six possible interpretations.) I recently encountered some code that tried and failed to convert "YY/MM/DD" data based on a "MM/DD/YY" format, from 1995 to 2000. Ironically, it always produced the correct result, because its error processing always silently reverted to the previously formatted data, which was correct. Now that "01/01/17" (January 17th, 2001) can be interpreted with the "MM/DD/YY" format (as January 1st, 2017), the program produces incorrect results... starting January 2nd, 2001. :wtf: http://c2.com/cgi/wiki?YearTwoThousandOneBug[^] In case anyone is interested in browsing, here's a list of various types of bugs: http://c2.com/cgi/like?YearTwoThousandOneBug[^] ------------------------------------------ The ousted but stubbornly non-dead leader reportedly released an audiotape this weekend, ending by calling on Iraqis to, quote, "resist the occupation in any way you can, from writing on walls, to boycotting, to demonstrating and taking up arms." adding, "you know, pretty much anything I used to kill you for." - The Daily Show

        D Offline
        D Offline
        Daniel Turini
        wrote on last edited by
        #3

        As a side note, I developed several data consolidation systems for credit bureaus. They were very sensitive to date and time values, and we put a validation on most batch processing to give a special error message in case of an inverted date/month if the error ammount occurred on around 60% of the dates(you know, 12 in 30 is around 40%). As everyone knows, Portuguese dates are written in the correct way (DD/MM/YYYY), but those crazy Americans keep writing inverted dates (MM/DD/YYYY) :) Trying to make bits uncopyable is like trying to make water not wet. -- Bruce Schneier By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn

        M 1 Reply Last reply
        0
        • D Daniel Turini

          As a side note, I developed several data consolidation systems for credit bureaus. They were very sensitive to date and time values, and we put a validation on most batch processing to give a special error message in case of an inverted date/month if the error ammount occurred on around 60% of the dates(you know, 12 in 30 is around 40%). As everyone knows, Portuguese dates are written in the correct way (DD/MM/YYYY), but those crazy Americans keep writing inverted dates (MM/DD/YYYY) :) Trying to make bits uncopyable is like trying to make water not wet. -- Bruce Schneier By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn

          M Offline
          M Offline
          Matt Sollars
          wrote on last edited by
          #4

          No offense was taken up here, I'm sure. However, the format is irrelevant. Data integrity enforcement is better than validation. For input; provide three separate inputs for a date. Take it even further by offering lists of only valid values, if that is acceptable for a given situation. For display; output the full year, one or two digits for the day and the name or abbreviation of the month in any order you wish. Your users will be able to understand the date regardless then. These are simple methods that are well worth the effort. ;)

          1 Reply Last reply
          0
          • B Brit

            While following a link from the Joel on Software article, I found this: Year Two Thousand One Bug The year 2001 is the first year since 1931 when a 2-digit year could be confused with a day of the month. It's the first time since 1912 that a 2-digit year could be confused with a month. So, what is "01/02/03"? Is it January 2nd, 2003, February 3rd, 2001, or something else? (Six possible interpretations.) I recently encountered some code that tried and failed to convert "YY/MM/DD" data based on a "MM/DD/YY" format, from 1995 to 2000. Ironically, it always produced the correct result, because its error processing always silently reverted to the previously formatted data, which was correct. Now that "01/01/17" (January 17th, 2001) can be interpreted with the "MM/DD/YY" format (as January 1st, 2017), the program produces incorrect results... starting January 2nd, 2001. :wtf: http://c2.com/cgi/wiki?YearTwoThousandOneBug[^] In case anyone is interested in browsing, here's a list of various types of bugs: http://c2.com/cgi/like?YearTwoThousandOneBug[^] ------------------------------------------ The ousted but stubbornly non-dead leader reportedly released an audiotape this weekend, ending by calling on Iraqis to, quote, "resist the occupation in any way you can, from writing on walls, to boycotting, to demonstrating and taking up arms." adding, "you know, pretty much anything I used to kill you for." - The Daily Show

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #5

            Since we outlandish people to stubborn to agree on the universal american arrangement to sort the date elements by significance, then shake them wildly, we learnt to live with this problem. I once almost lost my sanity over a production server that would mix up month and day now and then. Until I noticed that the dev server was running a german OS, and the production server an english one...


            "Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
            mlog || Agile Programming | doxygen

            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