Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 151 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

AccruedInterest:: (2 methods):
  periodic()
  atMaturity()


Class: AccruedInterest  - X-Ref

periodic($issue,$firstInterest,$settlement,$rate,$parValue = 1000,$frequency = FinancialConstants::FREQUENCY_ANNUAL,$basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD,$calcMethod = self::ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT)   X-Ref
ACCRINT.

Returns the accrued interest for a security that pays periodic interest.

Excel Function:
ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis][,calc_method])

param: mixed $issue the security's issue date
param: mixed $firstInterest the security's first interest date
param: mixed $settlement The security's settlement date.
param: mixed $rate The security's annual coupon rate
param: mixed $parValue The security's par value.
param: mixed $frequency The number of coupon payments per year.
param: mixed $basis The type of day count to use.
param: mixed $calcMethod
return: float|string Result, or a string containing an error

atMaturity($issue,$settlement,$rate,$parValue = 1000,$basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)   X-Ref
ACCRINTM.

Returns the accrued interest for a security that pays interest at maturity.

Excel Function:
ACCRINTM(issue,settlement,rate[,par[,basis]])

param: mixed $issue The security's issue date
param: mixed $settlement The security's settlement (or maturity) date
param: mixed $rate The security's annual coupon rate
param: mixed $parValue The security's par value.
param: mixed $basis The type of day count to use.
return: float|string Result, or a string containing an error