From koffice-devel Thu Aug 29 09:53:01 2002 From: Ferdinand Gassauer Date: Thu, 29 Aug 2002 09:53:01 +0000 To: koffice-devel Subject: Re: patch to fix #46917 X-MARC-Message: https://marc.info/?l=koffice-devel&m=103061484521200 Ariya Hidayat wrote: > >> As for 55 defaults to 2055, it's in KLocale (because 55<69, at least >> that's the way in kdelibs 3.0.3). Excel defaults to 1955 because the >> limit is 20 not 69. Changing KSpread to behave like this will require >> dumping the use KLocale::readDate(). > > Well, I found a hack to do this and still making use of > KLocale::readDate(), see the attached patch. > > In short: when entering date with 2 digit years, e.g 3/4/45, the year is > interpreter as year 19xx if xx is >=30, else it's year 20xx (in this case, > 1945 instead of KLocale's 2045). This makes it compatible with Excel. > > Please review. > > PS: The limit is actually 30, not 20 (I was wrong before). FYI ORACLE does it like this if the internal year of the box/database is in between 2000+/-50 years the 2 digit year is interpreted from 1951 to 2050 entering 98 -> 1998 entering 00 -> 2002 this of course works also for 2100 +/-50 :-)) and so on.... -- cu ferdinand _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel