Issue 75335 - Date calculating problem before year 0001 and after 32767
Summary: Date calculating problem before year 0001 and after 32767
Status: ACCEPTED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.2 RC3
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-12 18:49 UTC by lml
Modified: 2017-05-20 11:13 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Date After 31/12/32767 are wrong displayed (129.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-03-21 17:31 UTC, delorea
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description lml 2007-03-12 18:49:42 UTC
The "calculating bounds" not handled correctly:
Year after 32767 should results to 32768, or an error, but not a negative number.
(There is a similar problem before 32767BC, it results to a negative number.)

It seems, the years before years before year 0001 is supported in calculations,
but the negative sign is missing from the result.

also tested with OOo 2.2.1
Comment 1 kpalagin 2007-03-18 14:30:13 UTC
lml,
please provide repro steps demonstrating the problem.
Comment 2 delorea 2007-03-21 17:27:04 UTC
Confirmed with OOo 2.2.0RC3.
See attached sheet.
Comment 3 delorea 2007-03-21 17:31:01 UTC
Created attachment 43838 [details]
Date After 31/12/32767 are wrong displayed
Comment 4 delorea 2007-03-21 17:40:43 UTC
I'm also not able to insert dates in which year is of 5 digits.

Bye
 Delo
Comment 5 frank 2007-03-27 16:06:12 UTC
Hi Eike,

as discussed one for you.

Frank
Comment 6 ooo 2007-03-28 12:11:11 UTC
Yes, the calendar calculation should generate an error for years after 32767,
and a minus sign should be displayed for negative years. However, if the number
format uses the 'GG' format code, the era (BC/AD) is displayed. Date input does
not take more than 4 digits for years, this seems to be a restriction dating
back to when the DateTime class was used for analyzing the input, which doesn't
handle that. Should be aligned to accept signed 16-bit values as well.
Comment 7 magi 2007-05-23 16:55:12 UTC
There doesn't actually seem to be a way to input negative (BCE) dates. I would
expect that something like "-20.7.356" or "20.7.-356" should work (Finnish
locale has DD.MM.YYYY). Entering a formula "=-20.7.356" gives "14.6.3443".

Also entering dates such as "31.12.1" or "31.12.0001" changes it to
"31.12.2001". Is there any way to input dates in years between 1-99 CE?

Should this be a separate issue?
Comment 8 ooo 2007-05-23 17:30:25 UTC
@magi42: yes. please file a separate issue for input of negative dates and years
in the range 0001..0099; you may directly assign it to me, 'er'.

Thanks
  Eike
Comment 9 Marcus 2017-05-20 11:13:50 UTC
Reset assigne to the default "issues@openoffice.apache.org".