|
From: Ethan M. <merritt@u.washington.edu> - 2010-03-28 00:18:23
|
On Saturday 27 March 2010, Jonathan Thornburg wrote: > If I write the 2-digit year "50", does it mean 1950 or 2050? > [Let's leave aside the possibility of other centuries.] > In the original poster's case, I gather that 1950 would have been the > correct interpretation. But if I were plotting future values of a > retirement portfolio, 2050 would probably be the better choice. > Fundamentally, there is no way for gnuplot to know the "correct" > choice, so it has to make an arbitrary choice (which will be wrong > a fair number of times). Indeed. And if you are plotting a timeline of Roman emperors, "68" really does mean 68, the year of Nero's death. There is no end to this quagmire. The behaviour of a program may even depend on which library version it is linked against. Consider this lovely bit from the man page for strptime: The 'y' (year in century) specification is taken to specify a year in the 20th century by libc4 and libc5. It is taken to be a year in the range 1950-2049 by glibc 2.0. It is taken to be a year in 1969-2068 since glibc 2.1. So yes, I'll add a note in the documentation. But better by far not to use two-digit dates. Ethan |