Re: Y2K - date parsing

From: Byron C. Darrah <>
Date: Mon, 12 Oct 1998 08:16:20 -0700 (PDT)
Message-Id: <>

> From: Tom von Alten <>
> Date: Fri, 9 Oct 1998 18:08:31 -0600
> Byron Darrah wrote:
> > PS: On the Y2K subject. If anyone wants a fairly simple date class for C
> > or C++ that can add, subtract, convert to text, and parse dates reliably,
> > I've got one at that you can
> > try.
> Well, the "parse dates reliably" is what's at issue here. The only parsing
> in your C version is for MM/DD/YYYY and MM/DD/YY. Would that life in email
> headers were that simple!

Yeah, acknowledged. It was not intended to have "robust" parsing capability wrt all the different ways that dates commonly appear in text, or to even have much of anything to do with hypermail. (That's why I only mentioned it in the postscript.) It is very "reliable" however, as long as dates are input in the MM/DD/YY[YY] format, it has an excellent chance of interpreting the meaning correctly. I mainly use that class for it's function that adds days to a date and gives the correct new date.

One thing that class has, which might be a nice thing to put into the hypermail beta (?), is the way that it computes the century if given a two-digit year: It chooses whichever century will result in placing the date within fifty years of the current time. That helps insure against fast or slow clocks and a few other things.

--Byron Darrah Received on Mon 12 Oct 1998 05:19:40 PM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:50 PM GMT GMT