Site Archive (Complete)
Testing & Debugging Blog: You Are Not Done Yet: Dates and Y2K
Testing and Debugging
BREAKPOINTS

Test, Debug, Release, Rinse, Repeat ...

by Kevin Carlson
THE BOOK OF TESTING

Thoughts From a Braidy Tester

by Michael Hunter
April 09, 2007

You Are Not Done Yet: Dates and Y2K

You are not done testing unless...you have vetted your application for Year 2000 issues. Even though we are now well past that date, Y2K issues can crop up with the least provocation. Those of you on some form of Unix (e.g., all you Apple users) have another Y2K-ish situation coming up in 2038 when that platform's 32-bit time data structure rolls over. Oh, and as long as you're looking at date-related functionality, you may as well look for other date-related defects as well, such as general leap year handling.

  • Verify dates entered with a two digit year from 1 Jan 00 through 31 Dec 29 are interpreted as 1 Jan 2000 through 31 Dec 2029
  • Verify dates entered with a two digit year from 1 Jan 30 through 31 Dec 99 are interpreted as 1 Jan 1930 through 31 Dec 1999
  • Very dates at least through 2035 are supported
  • Verify dates in leap years are correctly interpreted:
    • 29 Feb 1900 should fail
    • 29 Feb 1996 should work
    • 29 Feb 2000 should work
    • 31 Dec 2000 should work and be identified as day 366
    • 29 Feb 2001 should fail
  • Verify other interesting dates are correctly interpreted and represented, including:
    • 31 Dec 1999 should work
    • 1 Jan 2000 should be unambiguously represented
    • 10 Jan 2000 (first seven digit date)
    • 10 Oct 2000 (first eight digit date)
  • Verify entering "13" for the month in year 2000 fails

Posted by The Braidy Tester at 07:30 AM  Permalink




 

♦ sponsored
INFO-LINK


Related Sites: DotNetJunkies, SD Expo, SqlJunkies