Files
PhpSpreadsheet/tests/data/Calculation/Financial/ACCRINTM.php
T
Mark Baker c699d144e2 Extract ACCRINT() and ACCRINTM() Financial functions into their own class (#1956)
* Extract ACCRINT() and ACCRINTM() Financial functions into their own class
Implement additional validations, with additional unit tests
Add support for the new calculation method argument for ACCRINT()
* Additional tests for Amortization functions
2021-03-26 22:49:16 +01:00

55 lines
1.2 KiB
PHP

<?php
// Issue date, Settlement, Rate, Par, Basis, Result
return [
[
20.547945205478999,
'2008-04-01', '2008-06-15', 0.10, 1000, 3,
],
[
800,
'2010-01-01', '2010-12-31', 0.08, 10000,
],
[
365.958904109589,
'2012-01-01', '2013-02-15', 0.065, 5000, 3,
],
[
73.1917808219178,
'2012-01-01', '2013-02-15', 0.065, 1000, 3,
],
[
'#NUM!',
'2008-03-05', '2008-08-31', -0.10, 1000, 2,
],
[
'#VALUE!',
'Invalid Date', '2008-08-31', 0.10, 1000, 2,
],
'Non-numeric Rate' => [
'#VALUE!',
'2008-03-01', '2008-08-31', 'NaN', 1000, 2,
],
'Invalid Rate' => [
'#NUM!',
'2008-03-01', '2008-08-31', -0.10, 1000, 2,
],
'Non-numeric Par Value' => [
'#VALUE!',
'2008-03-01', '2008-08-31', 0.10, 'NaN', 2,
],
'Invalid Par Value' => [
'#NUM!',
'2008-03-01', '2008-08-31', 0.10, -1000, 2,
],
'Non-numeric Basis' => [
'#VALUE!',
'2008-03-01', '2008-08-31', 0.10, 1000, 'NaN',
],
'Invalid Basis' => [
'#NUM!',
'2008-03-01', '2008-08-31', 0.10, 1000, 99,
],
];