To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 1515
1514  |  1516
Subject: 
Re: CGI question
Newsgroups: 
lugnet.off-topic.geek
Date: 
Mon, 10 Apr 2000 02:21:41 GMT
Highlighted: 
(details)
Viewed: 
148 times
  
In lugnet.off-topic.geek, Matthew Miller wrote:

Steve Bliss <blisses@worldnet.att.net> wrote:
IF FLD_XYZ_YR < 29 THEN
  FLD_XYZ_YR4 = 2000 + FLD_XYZ_YR4
ELSE
  FLD_XYZ_YR4 = 1900 + FLD_XYZ_YR4
ENDIF

Sure. That's a pretty typical Y2K fix. And it's basically what you do as a
human when looking at a two-digit year. (If I tell you that the expiration
date on my driver's license is 12-30-02, you assume 2002. If I tell you
it's 12-30-98, you assume I'm in trouble.) Of course, humans are much better
at fuzzy logic than COBOL, so it's not like 29 is hardcoded in your head,
but the concept is similar.

(This solution is known as "windowing".)

Yeah, the windowing/epoching/whatevering isn't a big deal.  The thing
is, they *hardcoded* the 29.  They didn't even make it a constant,
defined at the top of the code (or in a copybook).

So in some number of years, someone is going to have to go through all
the code, *again*, and fix this junk.

Steve



Message has 1 Reply:
  Re: CGI question
 
(...) Oh, but no one will *possibly* be using the same code in 29 years. We don't need to worry about that. *much laughter* The unix epoch rollover is gonna be another one.... (24 years ago, 10-Apr-00, to lugnet.off-topic.geek)  

Message is in Reply To:
  Re: CGI question
 
(...) Sure. That's a pretty typical Y2K fix. And it's basically what you do as a human when looking at a two-digit year. (If I tell you that the expiration date on my driver's license is 12-30-02, you assume 2002. If I tell you it's 12-30-98, you (...) (24 years ago, 8-Apr-00, to lugnet.off-topic.geek)  

14 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR