Years

    BACK

Copyright © 1998, Particle

Doing research on fixing the year 2000 problem... (or is it year 00 problem? ;-)

Determined by VERNAL EQUINOX, a year is: 365 days, 5 hours, 48 minutes, and 6 seconds.

Determined by SUN PASSING A FIXED STAR, a year is: 365 days, 6 hours, 9 minutes, and 9 seconds.

We cannot have decimal years, nor decimal days, thus, a leap year was invented. A leap year occurs every 4 years, but in a case of a century (year divisible by 100), every 400 years. A leap year is a year with 366 days (29 days in February).

VERNAL EQUINOX occurs twice a year. It's the time when the sun passes the equator. About 21st of March, and 22nd of September.

The arrangement of years (and leap years) makes it so that the average year approaches 365 and 1/4 days (i.e.: about 365 days, and 6 hours).

Months:
1: January: 31 days
2: February: 28 days, 29 days in leap years
3: March: 31 days
4: April: 30 days
5: May: 31 days
6: June: 30 days
7: July: 31 days
8: August: 31 days
9: September: 30 days
10: October: 31 days
11: November: 30 days
12: December: 31 days

The average days per year with the current calendar is: 365.2425000... days per year. However, the actual according to VERNAL EQUINOX readings is: 365.241736111... Thus, somewhere down the road (if earth is still alive), we'll have to change the calendar ;-)

The Y2K problem.

The problem is that COBOL (among others) store the data in YYMMDD format. Thus, changing the functions to just 'add on' the 19, or 20 to the 1900 or 2000 years is fairly impossible. (i.e.: that would wipe out the 'month and day field'). One possible solution is to add more space for the year... i.e.: YYYYMMDD. However, that involves TONS of code since there are MANY variables which do stuff with dates. Programmers have to go through every bit of code using dates, and add more data... for example, in COBOL one would add (or replace with) a new PIC.

       01  TEMP-DATE.
           05  TEMP-DATE-YEAR   PIC 99.
           05  TEMP-DATE-MONTH  PIC 99.
           05  TEMP-DATE-DAY    PIC 99.

Would be changed to something like:

       01  TEMP-DATE.
           05  TEMP-DATE-YEAR   PIC 9999.
           05  TEMP-DATE-MONTH  PIC 99.
           05  TEMP-DATE-DAY    PIC 99.

This would also involve changing the TIME function though. So that it returns date in YYYYMMDD format.

                ACCEPT TEMP-DATE FROM DATE.

(Another viable alternative would be to discard all the old programs and write new ones. I see absolutely nothing wrong with rewriting old and inefficient code into a more cleaner sleeker form.)

    BACK

Copyright © 1998, Particle