Budgets from your full months, the middle value per category, and say which months

A half month at the start of your history or one unusual month no longer sets the budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minimus7andClaude Opus 5.5 committed 2026-11-09 10:09:14 -06:00
1 parent c3276ab5c1
commit 37a97fe20a
6 files changed
+40 -15

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ const rows = [
{ month: "2026-09-01", income: 3240, spend: 1800 },
{ month: "2026-10-01", income: 3240, spend: 7000 },
];
assert.deepEqual(typicalMonth(rows, "2026-10-23", "2026-07-30"), { income: 3240, spend: 1000, months: 2 });
assert.deepEqual(typicalMonth(rows, "2026-10-23", "2026-07-30"), { income: 3240, spend: 1000, months: 2, list: ["2026-09", "2026-08"] }, "the partial July is left out");
assert.equal(typicalMonth(rows, "2026-10-23", "2026-06-01")!.income, (810 + 3240 + 3240) / 3, "3 full months");
// The e2e user: history from Jul 30 but only cents of interest until October's paychecks. Not $0.12 a month:
// October so far (2,835.92 over 23 days) scaled to a month.