Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: About java program. Date: Mon, 24 Jun 2013 21:29:48 +0000 (UTC) Organization: A noiseless patient Spider Lines: 48 Message-ID: References: <19wnriq53qxel.u9rt8wy6z52g.dlg@40tude.net> <6euehy3ijswn.e08p5nxwbfbf.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 24 Jun 2013 21:29:48 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="3068"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OeZTw9QX7Q1WsQ0G1e6uL0KCTijAyXzo=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:2rwvm2TS9O75kfsCh45eKTmBZFQ= Xref: csiph.com comp.lang.java.programmer:24525 On Mon, 24 Jun 2013 13:00:38 -0700, Gene Wirchenko wrote: > On Fri, 21 Jun 2013 21:14:39 +0000 (UTC), Martin Gregorie > wrote: > > [snip] > >>Consequently, you didn't bother with storing the century unless you >>really had to, e.g. you had people on file with birthdays in the >>previous century. > > In alt.folklore.computers, I have read posts by people who have > stated that there wre programs that had only one digit for year and when > the 1970's started, the report programs had to be updated. > I saw a note about that quite recently, but have never seen one myself. OTOH, I did see a payroll master file in which the century part of the employee birth date was an after-market patch (and probably after-take-on too). This ran in an ICL 1900 mainframe. To briefly recap, the standard 1900 date was stored internally as a 24 bit signed integer, based on day zero being 31Dec1899. The 1900 architecture was based round 24 bit words, each of which could hold 4 six-bit ISO characters and used two-shift character encoding, so using a word to hold dates made a lot of sense, but, although this allowed a date range of around 1670 AD to 2330 AD, the ICL subroutines for converting between binary and human-readable dates did not handle centuries: dates could only be formatted as dd/mm/yy. But I digress... One more fact: ICL 1900 tape and disk records were always variable length, so the first word in the record contained the record length (in words) in its lowest 12 bits as an unsigned integer. The upper 12 bits were unused.... You can see where this is going, can't you! Yep, the century was held as two characters stored in the top 12 bits of the record length word (either '18' or '19') and extracted from the employee's birth date as part of the process of reading input data from a punched card or inserted when printing payslips, reports etc. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |