Dave Rolsky wrote:

I think the standard is something along the lines of:

if ($year + 50 < ($current_year - 2000)) { $year += 1900 } else { $year += 2000 }


Except that this will probably be wrong when used to convert birthdates of retirees (actual project I had to deal with, BTW). See:


http://www.dmi.uiuc.edu/y2k/window.htm

for a way to handle moving windows.

The two digit year format is so pernicious that it demands a warning in pretty much all cases, and an error in any situation where the data is important.

John

--
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



Reply via email to