News for hackers. Stuff that matters.
Re:Ask HN: Was the Y2K crisis real? by unilynx on Thursday March 12, 2020 @06:58PM (#22562906)
A whole byte for a year? What a waste in 1995 when you've got just 640KB for DOS, your code and your data.

I looked up my old code. Shave off a bit of the year and:

  struct Date { 
       unsigned day : 5; 
       unsigned month : 4; 
       unsigned year : 7; 
    };
a full date in 16 bits. (well, in borland C++ 5 at least)

and as it was an accounting application, working with the bitfields was so much nicer than ordinal days you would use nowadays.

month and years was all you really cared about anyway when summarising data. in finance all months have 30 days anyway.

Re:Ask HN: Was the Y2K crisis real? by C1sc0cat on Friday March 13, 2020 @08:25AM (#22566689)
the problem came from the 60's when memory was really expensive on mainframes and you had things like drum storage