@@ 2156-2165 (lines=10) @@ | ||
2153 | return Functions::NAN(); |
|
2154 | } |
|
2155 | ||
2156 | if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { |
|
2157 | ++$maturity; |
|
2158 | $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; |
|
2159 | if (!is_numeric($daysBetweenSettlementAndMaturity)) { |
|
2160 | // return date error |
|
2161 | return $daysBetweenSettlementAndMaturity; |
|
2162 | } |
|
2163 | } else { |
|
2164 | $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); |
|
2165 | } |
|
2166 | ||
2167 | if ($daysBetweenSettlementAndMaturity > 360) { |
|
2168 | return Functions::NAN(); |
|
@@ 2210-2219 (lines=10) @@ | ||
2207 | return Functions::NAN(); |
|
2208 | } |
|
2209 | ||
2210 | if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { |
|
2211 | ++$maturity; |
|
2212 | $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; |
|
2213 | if (!is_numeric($daysBetweenSettlementAndMaturity)) { |
|
2214 | // return date error |
|
2215 | return $daysBetweenSettlementAndMaturity; |
|
2216 | } |
|
2217 | } else { |
|
2218 | $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); |
|
2219 | } |
|
2220 | ||
2221 | if ($daysBetweenSettlementAndMaturity > 360) { |
|
2222 | return Functions::NAN(); |