mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-22 01:13:40 +00:00
a34695e0f9
* Additional unit tests and rationalisation for Financial Functions * Providing a series of sample files for Financial functions * Refactor the last of the existing Financial functions * Some more unit tests with default assignments from null arguments Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
59 lines
1.3 KiB
PHP
59 lines
1.3 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,
|
|
],
|
|
[
|
|
800,
|
|
'2010-01-01', '2010-12-31', 0.08, 10000, null,
|
|
],
|
|
[
|
|
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,
|
|
],
|
|
];
|