OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [office-formula] Year 1900 bug


On Sun, 2010-01-24 at 15:16 -0800, Dennis E. Hamilton wrote:
> Your proposed wording is certainly an improvement.

I am not sure about that. But perhaps I don't even understand what hte
"Year 1900 bug" is all about, since we do not specify the exact serial
numbers anyways.

Let me explain in more detail and at the example of Gnumeric.

I understand that there has never been a Feb 29, 1900 since 1900 is
divisible by 4 but also by 100 and not be 400.

So Gnumeric knows very much that there is no such date either.
Nevertheless this doesn't stop Gnumeric to have the same date serial
numbers as Excel since this is required for compatibility. FOr the
compatibility you do not need to believe in a Feb 29, 1900.

Suppose you start a recent version of Gnumeric and enter in cell A1
1900/2/28. Gnumeric of course recognizes this as a date and converts it
into a serial number (59), showing it nevertheless as a date
(1900-Feb-28).

Now if you enter in A2 the formula =A1+1 then it will calculate the sum
of 59 and 1 resulting in 60. Since the form of the sum (reference
formatted as a cell plus a number) indicates a date calculation,
Gnumeric formats the result cell as a date. Since there is no date with
serial number 60 the cell shows ########. 

If we enter in A3 the formula =A2+1 we obtain 61 which is shown as
1900-Mar-01 since that date has serial number 60.

Note that there is no evidence of a "date bug". Also the current
OpenFormula draft does not specify how serial numbers are created, or
more specifically that they may not contain any skips, there is no bug
of any other type in sight!

Note that =datedif(A2,A4,"d") results as expected in 1 since these are
the true date differences!

Andreas
-- 
Andreas J. Guelzow <aguelzow@pyrshep.ca>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]