| Summary: | MONTHS function - third parameter not checked | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | raal <raal> |
| Component: | Calc | Assignee: | Eike Rathke <erack> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | h3734236, miguelangelrv |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:5.3.0 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
raal
2016-06-16 19:53:20 UTC
Hi @raal, I think many function have this kind of parameters working in this way, a true/false state, so any value different than zero is true. The same happens with IF() function I guess so it's quicker to know the parameter state. I don't think it is a bug. > I think many function have this kind of parameters working in this way, a
> true/false state, so any value different than zero is true.
This is not the case for MONTHS(), YEARS() or WEEKS(). Any value other than 1 is evaluated as 0, which at least might be unexpected..
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=14e31d6cf4c4ba8a28b932c77994bc905686dba5 Resolves: tdf#100440 check mode to be 0 or 1 for MONTHS(), YEARS() and WEEKS() It will be available in 5.3.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. Note: needed to adapt the WEEKS and YEARS test documents to cope with the change. |