Bug 117612 - DateAdd("m",...) does not truncate date to last valid day of month anymore
Summary: DateAdd("m",...) does not truncate date to last valid day of month anymore
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.5 target:7.3.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-05-14 16:30 UTC by Eike Rathke
Modified: 2021-07-05 15:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Rathke 2018-05-14 16:30:39 UTC
Related to generally stricter checking of date arguments, the BASIC DateAdd() function now reports an error if the result does not fit within the month to be determined, for example DateAdd( "m", 1, "2014-01-29") now results in error whereas it previously resulted in 2014-02-28 last day of target month.
Comment 1 Commit Notification 2018-05-16 09:39:44 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40c9a129e5a53e6eadfe8ca80c98ccf7eda957f9

Resolves: tdf#117612 truncate DateAdd("m",...) to last day of month

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Eike Rathke 2018-05-16 10:25:31 UTC
Pending review https://gerrit.libreoffice.org/54421 for 6-0
Comment 3 Commit Notification 2018-05-18 07:36:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=07a0748243fed290771b8805398b0ca7a52369f7&h=libreoffice-6-0

Resolves: tdf#117612 truncate DateAdd("m",...) to last day of month

It will be available in 6.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2021-07-05 15:50:08 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3be3a020d4c243f9b12d90fe75be103337002be6

tdf#117612: basic_macros: Add unittest

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.