[Libreoffice-bugs] [Bug 40575] Maximum date value in Base is 27/06/9957

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Nov 17 09:35:36 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=40575

--- Comment #28 from Alex Thurgood <iplaw67 at tuta.io> ---
(In reply to Eike Rathke from comment #23)
> Internal tools' class Date representation is now (since 5.2) capable to
> handle dates between -32768-01-01 and 32767-12-31, including conversion
> from/to css::util::Date
> 
> However, connectivity/source/commontools/dbconversion.cxx still has its own
> date implementation that probably interferes here. Someone familiar with
> Base should check what the consequences were if that was eliminated and the
> common tools Date routines be used. My guess is that various database
> related things can't cope with years > 9999 because year might be stored
> using 4 characters, so some extra handling will still be needed there.

@Eike :

Does any of this affect the DateAdd() function in LOBasic ?
Someone has just reported on the German M-L that the help is incorrect when
describing how to enter the string for the date (indeed, it does seem wrong,
but that is tangential to what is to follow):

Sub example_dateadd
MsgBox DateAdd("m", 1, 31012004) &" - "& DateAdd("M", 1, 31012005)
End Sub

Using the above:

- if use double quote characters around the date string, I get other error
messages, such as "unsuported type", or "unsupported operation" depending on
which way I type the string separators (dots or slashes);

- if I use as in the above example, i.e. no quotes around what is essentially
an integer, I get a MsgBox that displays "31/0/1/32767 - 31/01/32767" which is
obviously incorrect.

Is this behaviour related to the changes in date representation support of
css::util::Date or does DateAdd() rely on the Database date functions ?

Should I open a separate report for this ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171117/39541d05/attachment.html>


More information about the Libreoffice-bugs mailing list