diff --git a/crates/idx-cli/src/output/table.rs b/crates/idx-cli/src/output/table.rs index e47e3fd..0943690 100644 --- a/crates/idx-cli/src/output/table.rs +++ b/crates/idx-cli/src/output/table.rs @@ -1867,10 +1867,18 @@ pub fn print_corporate_calendar( range: &CalendarRange, actions: &[CorporateAction], ) -> Result<(), IdxError> { + // Offers still open are listed by the day they opened, which can be + // before `from`; the title says so rather than claim the range bounds + // every row. + let earlier = if actions.iter().any(|a| a.date < range.from) { + ", with offers opened earlier and still open" + } else { + "" + }; println!( "{}", format!( - "Corporate actions from {} to {} ({})", + "Corporate actions from {} to {}{earlier} ({})", range.from, range.to, actions.len() diff --git a/crates/idx-cli/tests/golden/stockbit-calendar.table.golden b/crates/idx-cli/tests/golden/stockbit-calendar.table.golden index 9ddb54e..7376ced 100644 --- a/crates/idx-cli/tests/golden/stockbit-calendar.table.golden +++ b/crates/idx-cli/tests/golden/stockbit-calendar.table.golden @@ -1,6 +1,6 @@ exit: 0 --- stdout -Corporate actions from 2026-11-03 to 2026-11-12 (17) +Corporate actions from 2026-11-03 to 2026-11-12, with offers opened earlier and still open (17) ┌────────────┬────────┬──────────────┬────────────┬──────────────────────────────────────────────────────────────────────────┐ │ DATE ┆ SYMBOL ┆ KIND ┆ EX ┆ DETAIL │ ╞════════════╪════════╪══════════════╪════════════╪══════════════════════════════════════════════════════════════════════════╡