@cubedelement.com/realty-investor-timeline 5.7.0 → 5.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [5.7.2](https://github.com/kvernon/realty-investor-timeline/compare/v5.7.1...v5.7.2) (2026-01-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * infinity corrections ([#77](https://github.com/kvernon/realty-investor-timeline/issues/77)) ([8caf790](https://github.com/kvernon/realty-investor-timeline/commit/8caf79086c6386d8af52c213556c91d38cf42388))
7
+
8
+ ## [5.7.1](https://github.com/kvernon/realty-investor-timeline/compare/v5.7.0...v5.7.1) (2026-01-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * interface and infinity corrections ([#76](https://github.com/kvernon/realty-investor-timeline/issues/76)) ([3b38a43](https://github.com/kvernon/realty-investor-timeline/commit/3b38a43046b821670eff699553e7a59aa48f70f6))
14
+
1
15
  # [5.7.0](https://github.com/kvernon/realty-investor-timeline/compare/v5.6.0...v5.7.0) (2026-01-15)
2
16
 
3
17
 
@@ -45,7 +45,7 @@ export interface ILedgerCollection {
45
45
  * @param date
46
46
  */
47
47
  getCashFlowYearAverage(date?: Date): number;
48
- getSummaryMonth(date: Date): ILedgerSummary;
48
+ getSummaryMonth(date: Date): ILedgerDetailSummary;
49
49
  getSummaryAnnual(year?: number): ILedgerSummary;
50
50
  getSummariesAnnual(year?: number): ILedgerSummary[];
51
51
  /**
@@ -146,7 +146,13 @@ class LedgerCollection {
146
146
  const firstMonth = cashFlowItems[0].created.getUTCMonth();
147
147
  const lastMonth = cashFlowItems[cashFlowItems.length - 1].created.getUTCMonth();
148
148
  const monthsWithData = lastMonth - firstMonth + 1;
149
+ if (monthsWithData <= 0) {
150
+ return 0;
151
+ }
149
152
  const totalCashFlow = this.getCashFlowQuarter(date);
153
+ if (totalCashFlow === 0) {
154
+ return 0;
155
+ }
150
156
  return (0, currency_1.default)(totalCashFlow / monthsWithData);
151
157
  }
152
158
  getCashFlowQuarter(date) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubedelement.com/realty-investor-timeline",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "A way to determine if and when your expenses would be covered",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",