Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Add-In: NETWORKDAYS accepts negative values as input | ||
---|---|---|---|
Product: | Calc | Reporter: | Unknown <non-migrated> |
Component: | ui | Assignee: | daniel.rentz |
Status: | CLOSED WONT_FIX | QA Contact: | issues@sc <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, jody |
Version: | 614 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Unknown
2002-04-04 17:10:13 UTC
I'll have a look, Peter This is not a problem of the NETWORKDAYS() function but a general formula parsing issue. In fact one can enter a negative date anywhere in a formula, like =1.1.2000- 1.1.1999 gives you the number of days in the year 1999. The NETWORKDAYS() function just takes the internal serial date number as parameters, like many other date funtions do. It could be considered to throw an error in the formula compiler if a unary '-' operator is encountered followed by a date value. taking it *** Issue 4152 has been marked as a duplicate of this issue. *** Target to OOo 2.0 Developer notes: later. According to the OpenOffice.org roadmap (http://tools.openoffice.org/releases) this issue was retargeted to OOo Later. re: "er Fri Apr 5 02:02:52 -0800 2002" Actually I think the reverse is true. It is a bug in NETWORKDAYS. That function needs to validate it's inputs, including the date serials. Checking for a negative sign is incorrect. eg if A1=-10, then passing -A1 is correct. It's up to the function to handle things. Both is/was true. A negative date like -1.2.3 entered directly in the formula (note that I'm not speaking of something like -A1 here) should be detected by the compiler, and functions like NETWORKDAYS() should of course evaluate their arguments for plausibility. However, being able to directly enter dates in a formula vanished anyway, and as soon as we will implement array constants it will be mandatory to not accept unquoted days because of the delimiter mess. Reassigning issue to Daniel, for he is the maintainer of the AddIn functions that should take care of their parameters. accepted title we can ignore negative dates here, seems that this issue is just about checking that start date is less than end date, e.g. =NETWORKDAYS( DATE(2008;01;08); DATE(2008;01;01) ) results in -6 instead of an error hmmm ... checked in MS Excel, works there in the same way, so we should not change it :-( we will continue to accept negative serials for dates, which are accepted in all Calc functions. Something like "-12.1.2002" or "-DATE(2002;12;1)" results in the serial -37591 which means "37591 days before the null date 1899-Dec-30", thus is the valid date 1797-Jan-27. close the wontfix issue |