Sunday, 10 June 2007

Bug: Excel CSV records with four-digit year specifications

Importing Excel CSV records with four-digit year fields failed because the test for two-digit years greater than 88 failed to also verify that the year was less than 100. Consequently a year of, say, 2006 would be deemed a specification of year 3906, which would be rejected by the sanity check. I rewrote the test for two-digit years and, in the process, simplified the code. I also made the Excel CSV diagnostic code, which previously had to be commented on or off, conditional on a new \verb+$excelCSVdebug+ variable, so simply changing this variable enables or disables all of the diagnostic output. (Reported by Jennie Koffman.)

No comments: