Apache OpenOffice (AOO) Bugzilla – Issue 26125
date functions ...
Last modified: 2011-02-11 11:13:36 UTC
I have a collected spreadsheet of OO.o/Excel compatibility problems; some of the most interesting being the date problems collected at the bottom. This spreadsheet generated using Office XP. Date functions (OfficeXP) Value MONTH Excel DAY Excel YEAR Exce 0 12 1 30 0 1899 1900 1 12 1 31 1 1899 1900 2 1 1 1 2 1900 1900 the columns being =MONTH(A2) etc. =DAY(A2) etc. As you can see, at small values there appears to be a considerable disparity; is this potentially related to zforfind.cxx's pNullDate value ? and/or why is that constant cut/pasted into zforscan.cxx ? Thanks.
Created attachment 13573 [details] problematic sheet
This is a result of the infamous "date" 1900-02-29. We decided long ago not to duplicate that behavior, and adjust the null date by a day instead. This does mean that dates between 1900-01-01 and 1900-02-28 behave differently from Excel. The problem with introducing that day would be that it would extend into areas like the API, add-in functions, I18N calendar functions, or the file format. We can't, for example, specify "ISO-8601 format date" in the file format and then write "1900-02-29" in that case - it isn't a valid ISO date. So this has to remain the way it is. Compatibility is important, but sanity is, too.
so closed
*** Issue 50460 has been marked as a duplicate of this issue. ***
*** Issue 67399 has been marked as a duplicate of this issue. ***
*** Issue 85342 has been marked as a duplicate of this issue. ***
*** Issue 85395 has been marked as a duplicate of this issue. ***
*** Issue 116907 has been marked as a duplicate of this issue. ***