Given the date 02/11/03 in the locale en_US (so you can assume m/d/y), what year is that in?
As a human I say that is 2003. What should the rule be? Does the following sound reasonable: 1) Work out the current decade (now 00) 2) Any date in the current and next decade (00, 10) are assumed to be in the future 3) All other dates are assumed to be in the past
Add the following code (modulo what you called the year variable):
if (length($yr) < 4)
warn ("Your year value is indeterminant. Performing SWAG[1]!");
Then do a search on Google for "y2k window" and see how people suggested handling it. Yes, it _is_ completely bogus and arbitrary, why do you ask? But when dealing with malformed data, the old warhorse of GIGO[2] applies.
John
1) http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=swag&action=Search 2) http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=gigo&action=Search
-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
