curo 3.0.2 copy "curo: ^3.0.2" to clipboard
curo: ^3.0.2 copied to clipboard

Powerful, modern Dart library for precise instalment credit calculations - from simple loans to advanced amortisation schedules.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

3.0.2 - 2026-01-26 #

Fixed #

  • Added missing tolerance argument to solve method signatures
  • Added missing changelog entry to doc/site changelog summary

3.0.1 - 2026-01-22 #

Fixed #

  • Corrected first draw-down date detection when solving for an unknown advance amount (previously skipped due to placeholder 0.0 value).
  • Improved discount factor operand logging: now correctly labels time fraction as t (e.g., "t = 31/360 = 0.08611111") instead of f for Standard formula, aligning notation with US Appendix J convention.

Changed #

  • Removed redundant isCharge field from CashFlow record (superseded by CashFlowType.type); updated all references accordingly.

3.0.0 - 2026-01-20 #

Breaking Changes & Complete Rewrite #

  • Modern ground-up rewrite of the entire package, aligning design, behaviour, and accuracy with the sister project curo-python.
  • Adopted modern Dart conventions: null-safety, sealed classes, records, enhanced enums, and idiomatic patterns.
  • Flattened API structure: replaced deep OOP inheritance with a cleaner, more Pythonic composition style while retaining full type-safety.
  • Redesigned core types:
    • Introduced immutable Series hierarchy (SeriesAdvance, SeriesPayment, SeriesCharge) for defining cash flow series.
    • Replaced mutable cash flow objects with lightweight immutable CashFlow records.
    • Extracted internal helpers for better testability.
  • Asynchronous solving: solveRate and solveValue now return Future<double> (consistent with modern Dart expectations and the original 1.1.0 behaviour).
  • Simplified precision handling: single precision parameter on Calculator (0–4 decimal places).
  • All public APIs updated — existing code from ≤2.x will require migration.

Added #

  • Built-in pretty-printed amortisation and APR proof schedules via ScheduleRow.prettyPrint.
  • Comprehensive day count convention coverage unchanged but now with cleaner implementation and better documentation.
  • Greatly expanded internal test coverage.

Removed #

  • Legacy mutable cash flow classes and deep inheritance chains.
  • Old synchronous solve methods.

This major version represents a transformative modernisation while preserving (and in many cases improving) numerical accuracy and regulatory compliance.

2.4.3 - 2025-12-14 #

Enhancements #

  • Enhanced same-date CashFlowAdvance sorting by amount descending (most negative first).

Fixed #

  • Corrected priority of same-date advances in profile sorting.

2.4.2 - 2025-12-12 #

Enhancements #

  • Improved cash flow sorting to consistently order same-date flows: advances → payments → charges.
  • Added ==, hashCode, and copyWith to DayCountFactor.

2.4.1 - 2025-12-08 #

Enhancements #

  • Strengthened root solver with bisection fallback for Newton-Raphson, improving reliability on long-term loans and edge cases.
  • Expanded end-to-end tests for extreme scenarios.

Fixed #

  • Profile builder now correctly honours user-provided start dates in arrears mode.
  • Restricted UKConcApp to valid DayCountTimePeriod options.

2.4.0 #

Added #

  • Implemented US Appendix J day count convention (Regulation Z) with full unit-period and leap year support.
  • Extended DayCountFactor to two-component model (principalFactor + fractionalAdjustment).

Breaking #

  • Renamed DayCountFactor.factorprincipalFactor.

Enhancements #

  • Improved DayCountFactor string formatting for complex conventions.
  • Added comprehensive tests validated against FFIEC APR calculator.

2.3.1 #

Fixed #

  • Corrected interest accrual when additional advances occur during repayment phase.

2.3.0 #

Added #

  • Unified UK CONC App 1.1 and 1.2 into single UKConcApp class with isSecuredOnLand toggle.

2.2.0 #

Added #

  • Implemented UK CONC App 1.1 (secured on land) and UK CONC App 1.2 (unsecured) conventions.

2.1.4 #

Documentation #

  • Clarified that EU200848EC remains valid despite directive repeal.

2.1.3 #

Fixed #

  • Corrected EU200848EC month-end handling for February 28/29.

2.1.1 #

Enhancements #

  • Improved DayCountFactor.toString() and toFoldedString() for long formula rendering.

2.1.0 #

Changed #

  • Switched to standard Newton-Raphson solver.

Added #

  • Actual360 and 30U360 conventions.
  • Support for 0–4 decimal precision.

2.0.0 #

  • Updated to Dart SDK ≥3.0.0.
  • Dependency refresh and housekeeping.

1.1.1 #

Added #

  • Exported UnsolvableException.

Fixed #

  • README examples.

1.1.0 #

Added #

  • Asynchronous computational methods.
  • UnsolvableException.

1.0.0 #

  • Initial release.
8
likes
160
points
335
downloads

Publisher

verified publisherconfido.ie

Weekly Downloads

Powerful, modern Dart library for precise instalment credit calculations - from simple loans to advanced amortisation schedules.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

intl, meta

More

Packages that depend on curo