private static function PHPExcel_Calculation_Financial::_coupFirstPeriodDate in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php \PHPExcel_Calculation_Financial::_coupFirstPeriodDate()
6 calls to PHPExcel_Calculation_Financial::_coupFirstPeriodDate()
- PHPExcel_Calculation_Financial::COUPDAYBS in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php
- * COUPDAYBS
*
* Returns the number of days from the beginning of the coupon period to the settlement date.
*
* Excel Function:
* COUPDAYBS(settlement,maturity,frequency[,basis])
*
* @access public
* @category Financial Functions
*
- PHPExcel_Calculation_Financial::COUPDAYS in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php
- * COUPDAYS
*
* Returns the number of days in the coupon period that contains the settlement date.
*
* Excel Function:
* COUPDAYS(settlement,maturity,frequency[,basis])
*
* @access public
* @category Financial Functions
*
- PHPExcel_Calculation_Financial::COUPDAYSNC in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php
- * COUPDAYSNC
*
* Returns the number of days from the settlement date to the next coupon date.
*
* Excel Function:
* COUPDAYSNC(settlement,maturity,frequency[,basis])
*
* @access public
* @category Financial Functions
*
- PHPExcel_Calculation_Financial::COUPNCD in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php
- * COUPNCD
*
* Returns the next coupon date after the settlement date.
*
* Excel Function:
* COUPNCD(settlement,maturity,frequency[,basis])
*
* @access public
* @category Financial Functions
*
- PHPExcel_Calculation_Financial::COUPNUM in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php
- * COUPNUM
*
* Returns the number of coupons payable between the settlement date and maturity date,
* rounded up to the nearest whole coupon.
*
* Excel Function:
* COUPNUM(settlement,maturity,frequency[,basis])
*
* @access public
*…
... See full list
File
- vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php, line 83
Class
- PHPExcel_Calculation_Financial
- PHPExcel_Calculation_Financial
Code
private static function _coupFirstPeriodDate($settlement, $maturity, $frequency, $next) {
$months = 12 / $frequency;
$result = PHPExcel_Shared_Date::ExcelToPHPObject($maturity);
$eom = self::_lastDayOfMonth($result);
while ($settlement < PHPExcel_Shared_Date::PHPToExcel($result)) {
$result
->modify('-' . $months . ' months');
}
if ($next) {
$result
->modify('+' . $months . ' months');
}
if ($eom) {
$result
->modify('-1 day');
}
return PHPExcel_Shared_Date::PHPToExcel($result);
}