https://bz.apache.org/ooo/show_bug.cgi?id=119374

--- Comment #8 from Andreas Säger <[email protected]> ---
FYI: Recent discussion on the user forum about the meaning of negative time
values which do make sense:
https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=78985

Excel is not the reference when dealing with date/times, particularly not when
negative values are involved which Excel can not handle at all.

I don't see any reason why function TIME should not behave like function DATE
which calculates correct positive and negative day numbers for any positive or
negative integers you throw at it. Ok, the year has to be Gregorian (>1582).

The cell value calculated by TIME should be as simple as 
=hours/24+minutes/1440+seconds/86400 => positive or negative number
representing the amount of days.
This value can be formatted as a point of time HH:MM:SS or as a period of time
[HH]:MM:SS

Current implementation of TIME works like this:
=MOD(hours/24+minutes/1440+seconds/86400;1) but only if the result is a
positive value which is a needless restriction since contrary to Excel we do
support negative numbers formatted as date/times and the DATE function
calculates all days between the years 1582 and 1899 very well, even with
negative and zero months and days.

=DATE(1900;0;0) => 1899-11-30 zeroth month is December, zeroth day of December
is 30 November
=DATE(1700;-1;-1) => 1699-10-30 same logic with 2 months and 2 days before 1st
of January 1700

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to