Can anyone help me to use financial functions in financial_class.php (http://www.phpclasses.org) COUPDAYBS () returns wrong output function COUPDAYBS($settlement, $maturity, $frequency, $basis = FINANCIAL_BASIS_MSRB_30_360) { if (!$this->_is_valid_basis($basis)) return null; if (!$this->_is_valid_frequency($frequency)) return null; if ($settlement >= $maturity) return null; switch ($basis) { case FINANCIAL_BASIS_MSRB_30_360: // US(NASD) 30/360 $dsm = $this->Thirty360USdayCount($settlement, $maturity); break; case FINANCIAL_BASIS_ACT_ACT: // Actual/actual $dsm = $this->ActualActualdayCount($settlement, $maturity); break; case FINANCIAL_BASIS_ACT_360: // Actual/360 $dsm = $this->Actual360dayCount($settlement, $maturity); break; case FINANCIAL_BASIS_ACT_365: // Actual/365 $dsm = $this->Actual365yearFraction($settlement, $maturity); break; case FINANCIAL_BASIS_30E_360: // European 30/360 $dsm = $this->Thirty360EUdayCount($settlement, $maturity); break; } // PROBLEM MAY BE IN BELOW LINES switch ($frequency) { case 1: // anual payments return 365 - ($dsm % 360); case 2: // semiannual return 365 - ($dsm % 360); case 4: // quarterly return $this->DATEDIFF('day',$this->DATEADD('day',-ceil($dsm/90)*90 - ($dsm%90),$maturity),$settlement); } return null; } I need the following functions also COUPDAYS () COUPDAYSNC () PRICE () ACCRINT () Can anybody help me. Urgent -- Best Regards Eng. T. Kaneshalingam, AMIE(SL) Project Manager, E-commerce & Content Services LankaCom Services (Pvt) Ltd 65C, Dharmapala Mawatha, Colombo 07. Sri Lanka. E - kanesh@xxxxxxxxxxxx M - +94 777227960 T - +94 112437545 F - +94 112437547 W - www.lankacom.net --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. [Non-text portions of this message have been removed]