INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How are 2-digit years converted into 4 digits?  (Read 992 times)

Solomon

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 71
How are 2-digit years converted into 4 digits?
« on: March 13, 2006, 08:56:14 pm »

It's pretty cool that dates can be input in many different formats and are recognized correctly.  However, the way a 2-digit year input by the user is translated into a 4-digit year is inconsistent.

If you type in nothing but two digits into the date field, "00" through "25" are interpreted to mean "2000" through "2025", and "26" through "99" are taken to mean "1926" through "1929".

However, if you type in "jan 15 00" through "jan 15 29", you get a year from 2000 to 2029, and if you type in "jan 15 30" through "jan 15 99" you get a year from 1930 to 1999.

The four years 26-29 are handled differently depending on whether a month and day are included or not.

My suggestion: I can't imagine why I'd ever want to enter a future date (unless perhaps I'm typing in the copyright or release date of an album and it's copyright or released next year - that's a possibility if I have an advance copy).  Anyway, I'd suggest that if the user types in a 2-digit year, it should be interpreted to be in the past.  So, "06" should be 2006, and "07" should be 1907.  This should be calculated with reference to the current date and time at the time of input, not hard-coded into the software.

Solomon
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42374
  • Shoes gone again!
Re: How are 2-digit years converted into 4 digits?
« Reply #1 on: March 13, 2006, 10:05:24 pm »

It's a grey area.

Your best bet is to type the extra two digits.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up