Date errors in LibreOffice

Juan C. Sanz jcsanz at libreoffice.org
Mon Oct 24 22:39:24 UTC 2022


Hi

A few weeks ago I proposed a patch 
https://gerrit.libreoffice.org/c/core/+/138845 related to bug 
tdf#150587, which removed what I felt was an artificial limitation on 
the range of dates that can be entered in some LibreOffice form controls.

Due to some comments, I reverted the patch and started to do some 
testing of the behavior of dates in LibreOffice.

As a result of the tests I could observe a number of errors:

  *

    When exporting dates from Calc to Writer database fields , out of
    8exported dates, 2incorrectly exported → *25 **% errors*

  *

    When exporting dates from Calc to a Base database, out of 8exported
    dates, 3are incorrectly exported → *37,5**% errors*

  *

    When opening with Base a Firebird database table (created
    externally), out of10data, 7 are displayed incorrectly → *70**% errors*

  *

    If the above data is displayed in a form, instead of in a table, all
    datas are displayed incorrectly, *100 % errors*

  *

    When entering data in a table in Base, of 6data entered, at least 3
    incorrectly show → *50 **% errors*

  *

    Of the 6 data entered above, 3 are saved incorrectly, but curiously
    they are not exactly the same as they were wrongly displayed
    →***50**% errors*

Since all the data used in the tests are extreme data, and therefore 
produce extreme errors, surely in normal employment not so many errors 
occur. But although it, cannot be ruled out that similar errors occur in 
normal use of LibreOffice components (they have occurred to me).

It is true that the normal procedure when detecting errors should be to 
report them in bugzilla. But in this case, in my point of view, before 
proceeding to qualify certain behaviors as errors or not, we have to 
decide what treatment we want to give to the date in LibreOffice.

Because, currently, on one hand, each of the LibreOffice components, or 
even parts of the same component, treat dates in a different way. For 
example, in Calc you can enter almost all dates without any problem and 
dates are not modified (only the dates not allowed are converted to 
text), while in Base or in Writer form controls, sometimes dates are 
modified without warning.

And on the other hand, there are components or controls that 
artificially limit the range of dates they allow input, but, curiously, 
they can show dates that they do not allow to enter.

It seems that this artificial limitation imposed on the date range has 
been implemented to avoid (and not to solve) problems with certain dates.

In conclusion IMHO, it should be open a debate and decide what treatment 
should be to give to dates and apply that decision in all LibreOffice 
components.

In my view the best solution would be to use the proleptic Gregorian 
calendar in all components and, furthermore, not artificially limit 
dates to a relatively narrow range of dates, but to be able to enter 
dates at least in the range between 0001-01-01 and 9999-12-31.

Sorry for the length.

Regards

PS: Attached a Writer document explaining tests I have done and results 
(I'm not sure if attachments are allowed)

-- 
*Juan C. Sanz*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20221025/5ceb6167/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Errores con fechas INGL?S.odt
Type: application/vnd.oasis.opendocument.text
Size: 288225 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20221025/5ceb6167/attachment-0001.odt>


More information about the LibreOffice mailing list