Re: Convert Min to string !!
Posted in 1999
Topics: General Discussion
> > # Adjust MonthDays for leapyear - modulus works because 1900 is base yr > if ((years % 4) == 0) > for (idx=2; ix < 13; idx++) > MonthDays[IDX] += 1; That only works until 2096. You've set him up for a Y2.1K problem. Mark Collins mcollins@us.dhl.com
Mark Collins wrote: > > > > > # Adjust MonthDays for leapyear - modulus works because 1900 is base yr > > if ((years % 4) == 0) > > for (idx=2; ix < 13; idx++) > > MonthDays[IDX] += 1; > > That only works until 2096. You've set him up for a Y2.1K problem. Oh come now these programs will never live that long! ;-)<HUGE GRIN> Actually it will work until 2099. I did say it wasn't tested, didn't I? OK OK, s/b: if (((years % 4) == 0 && (years % 100) != 0) || (years % 400) == 0) Art S. Kagel