From 9bd604aa1201f3deaa7a9c1aebd7ad0645870a71 Mon Sep 17 00:00:00 2001 From: Harrison Booth <73434116+Harrison-Booth@users.noreply.github.com> Date: Mon, 26 Oct 2026 07:45:38 -0500 Subject: [PATCH] Correct the dated_flows doc comment for blank cells --- crates/functions/src/financial.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/functions/src/financial.rs b/crates/functions/src/financial.rs index cc3716f03..9c5477521 100644 --- a/crates/functions/src/financial.rs +++ b/crates/functions/src/financial.rs @@ -261,8 +261,9 @@ fn npv(a: &[Arg], _c: &mut dyn Ctx) -> R { /// /// Blank cells follow what Excel returns (observed on synthetic workbooks). With `lenient` (XIRR) /// a blank value counts as 0 and a blank date is ignored when its value is blank or 0; a nonzero -/// value without a date is `#NUM!`. XNPV is strict: a blank value is `#NUM!`, and so is a blank -/// date next to a blank or 0 value (`#VALUE!` next to a nonzero one). +/// value without a date is `#NUM!`, except in the first row, where the date is read as day 0. +/// XNPV is strict: a blank (or text) value or a blank date is `#NUM!`, except in the first row, +/// where it is `#VALUE!`. fn dated_flows(values: &Value, dates: &Value, lenient: bool) -> R<(Vec, Vec)> { let va = as_array(values); let da = as_array(dates);