|
lgoodbar@tecinfo.com wrote: >For birthdates, the system will only accept the current or previous >century. If today is 1997/09/15, and the user enters 091597, the >system will "assume" 1997; however, if the user enters 091697, the >computer "assumes" the previous century because the date is "after" >today. This logic is faulty. In the early years of the next century there will still be people alive who were born in the 19th century. You can't just default to the previous century if you're covering a period that spans more than a hundred years. Assume the current year is 2001. Based on a maximum human life span of 120 years the range of valid birth years (sliding window) will be 1881 - 2001. The user enters a DOB with a 2 digit year of 52. It's a reasonable assumption that this is 1952 and there is no need to force the user to enter 4 digits for the year. The user enters a birth year of 97. This could be the DOB of a 4 year old born in 1997 or a 104 year old born in 1887. Assuming our database can encompass both these people (again, know your data) the program must now either force the user to enter the century or guess the century and force the user to confirm or reject the guess. Similarly, if the current year is 2050 and the user enters a birth year of 46, it's not safe to assume that this year is "in the past" therefore it must mean 2046. It could just as well mean 1946. Dave Kahn - TCO, Tengiz, Kazakstan ========= e-mail: kahn@tengizchevroil.com (until September 30th) dkahn@cix.compulink.co.uk (from October 1st) +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.