Issue 93534 - ODFF: PRICEDISC et al.: Basis 0 NASD implementation
Summary: ODFF: PRICEDISC et al.: Basis 0 NASD implementation
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 2.4.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: Rob Weir
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-06 07:30 UTC by drking
Modified: 2014-01-13 11:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description drking 2008-09-06 07:30:17 UTC
A number of functions, including PRICEDISC use GetDiffDate() to calculate the 
result.

GetDiffDate() doesn't implement basis 0 (NASD) correctly - it makes no attempt 
to change month end dates.
Example:
PRICEDISC("2009-07-31";"2009-08-5";2%;100;0) returns
99.977777777778 based on 30+5-31 = 4 days difference in dates (!)
Excel correctly returns
99.972222222222 (5 days difference in dates)

(note that the inverse function YIELDDISC uses a difference routine (!) - 
YEARFRAC - I have not investigated that yet)

Reference: NASD implementation was also the subject of issue 84934 - for 
DAYS360.

PS: GetDiffDate() also gives the days in the *first year* - this is often not 
what is required, and is different from Excel. I'm not yet sure how this should 
be specified.

I guess there are ODFF implications here?
Comment 1 drking 2008-09-06 07:35:37 UTC
My comment : "GetDiffDate() also gives the days in the *first year*" is really 
covered in: Issue 93527 so can possibly be ignored here.
Comment 2 Edwin Sharp 2014-01-13 11:41:37 UTC
Confirmed with
AOO410m1(Build:9750)  -  Rev. 1552994
Rev.1552994
Excel 2010
Win 7