<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - =DAYS360(A58,NOW())"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144239">bug 144239</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>NOTABUG
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - =DAYS360(A58,NOW())"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144239#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - =DAYS360(A58,NOW())"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144239">bug 144239</a>
from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
<pre>This is correct and not a bug. DAYS360() "Returns the difference between two
dates based on the 360 day year", see
<a href="https://help.libreoffice.org/latest/en-GB/text/scalc/01/func_days360.html">https://help.libreoffice.org/latest/en-GB/text/scalc/01/func_days360.html</a>
and
<a href="https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#DAYS360">https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#DAYS360</a>
for the algorithms.
For the example in the report with US-NASD algorithm we have
(2021*360=727560 + 8*30=240 + 31) = 727831
-
(2021*360=727560 + 9*30=270 + 1) = 727831
= 0
(In reply to Michael Warner from <a href="show_bug.cgi?id=144239#c1">comment #1</a>)
<span class="quote">> This document shows DAYS360 returning the same value for both August 30 and
> August 31.</span >
Yes, though that document tests a different, European, algorithm (3rd argument
!=0, note also there's no difference between 1 or 2, it's a logical parameter,
either 0 or not 0). Result is different in this case.
For 2021-08-31 start date day is changed to 30.
Then for both we have
(2021*360=727560 + 9*30=270 + 1) = 727831
-
(2021*360=727560 + 8*30=240 + 30) = 727830
= 1
Please also don't use text arguments for numeric parameters, result depends on
settings (i.e. I get #VALUE! errors for all because I use the strictest
setting). In this case use the DATE() function instead. Yes, the help is bad on
that.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>