@@ 2172-2181 (lines=10) @@ | ||
2169 | return Functions::NAN(); |
|
2170 | } |
|
2171 | ||
2172 | if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { |
|
2173 | ++$maturity; |
|
2174 | $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; |
|
2175 | if (!is_numeric($daysBetweenSettlementAndMaturity)) { |
|
2176 | // return date error |
|
2177 | return $daysBetweenSettlementAndMaturity; |
|
2178 | } |
|
2179 | } else { |
|
2180 | $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); |
|
2181 | } |
|
2182 | ||
2183 | if ($daysBetweenSettlementAndMaturity > 360) { |
|
2184 | return Functions::NAN(); |
|
@@ 2226-2235 (lines=10) @@ | ||
2223 | return Functions::NAN(); |
|
2224 | } |
|
2225 | ||
2226 | if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { |
|
2227 | ++$maturity; |
|
2228 | $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; |
|
2229 | if (!is_numeric($daysBetweenSettlementAndMaturity)) { |
|
2230 | // return date error |
|
2231 | return $daysBetweenSettlementAndMaturity; |
|
2232 | } |
|
2233 | } else { |
|
2234 | $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); |
|
2235 | } |
|
2236 | ||
2237 | if ($daysBetweenSettlementAndMaturity > 360) { |
|
2238 | return Functions::NAN(); |