On Tuesday 06 March 2007 12:23, Johnny Andersson wrote:
[...]
>
> However, I thought about this for a while yesterday, and I found one
> explanation, which could be very wrong or maybe even right: Doesn't Excel
> start with 1899-12-31? And doesn't Excel have that leap year bug? If
> OpenOffice.org handles 1900 as a non leap year (as it should), then the
> start date have to be 1899-12-30 if  recent dates are going to have the
> same numbers in Excel and OpenOffice.org Calc. If this is true, all dates,
> from 1900-03-01 until eternity, will have the same numbers in Excel and
> OpenOffice.org Calc. Examples:

You are probably right, but what surprised me about this was why conversion 
between a date and a number was even allowed at all. A date is a conventional 
method of referring to some point in time, neither more nor less. If you have 
two dates D1, D2, it makes sense to subtract them to get the number of days 
between them, but what does adding, multiplying, dividing them mean? Or 
taking the square root? [But adding a number to a date gives another date.]

Treating a date as merely some formatting method of a real number is bizarre, 
but I suspect it is exactly what MS did in Excel, and so it built in an 
arbitrary origin. OOo followed so it could read and process Excel 
spreadsheets, but really the origin is arbitrary, and so is the 
representation of the date, whether it be Gregorian, Julian, Jewish, one of 
the Islamic forms, Chinese, Mayan, or any other format - the actual point in 
time is the same, just named differently.

Curiously, if you look at the content.xml file in an unzipped .ods file, it 
appears that it represents dates as their own data type, and no origin is 
given, just the UTC format for the value, and the text to display in a cell. 
This means that they do know which values are dates, and so could disallow 
any stupid operation on them.

-- 
Andy Pepperdine

On this mailing list help is provided by volunteers.
Please subscribe to the mailing list to see all the replies to a query,
and reply only to the mailing list.

For FAQ, userguide, see: http://documentation.openoffice.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to