Apache OpenOffice (AOO) Bugzilla – Issue 93534
ODFF: PRICEDISC et al.: Basis 0 NASD implementation
Last modified: 2014-01-13 11:41:37 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?
My comment : "GetDiffDate() also gives the days in the *first year*" is really covered in: Issue 93527 so can possibly be ignored here.
Confirmed with AOO410m1(Build:9750) - Rev. 1552994 Rev.1552994 Excel 2010 Win 7