8 releases

0.2.3 Nov 14, 2021
0.2.2 May 23, 2020
0.2.1 May 20, 2019
0.2.0 Jun 18, 2018
0.1.3 Jun 15, 2018

#6 in #libre-office

Download history 10/week @ 2024-07-29 96/week @ 2024-09-23 8/week @ 2024-09-30 10/week @ 2024-10-07 88/week @ 2024-10-21 35/week @ 2024-10-28

133 downloads per month

Apache-2.0

7KB
72 lines

Crates.io

Implementation of the XIRR function found in spreadsheet applications like LibreOffice Calc for Rust. Download from crates.io and visit the documentation for further details.

License

xirr is licensed under the Apache License, Version 2.0 which can be found in the LICENSE file.


lib.rs:

XIRR

xirr implements the XIRR function found in spreadsheet applications like LibreOffice Calc.

Example

use xirr::*;

let payments = vec![
    Payment { date: "2015-06-11".parse().unwrap(), amount: -1000.0 },
    Payment { date: "2015-07-21".parse().unwrap(), amount: -9000.0 },
    Payment { date: "2018-06-10".parse().unwrap(), amount: 20000.0 },
    Payment { date: "2015-10-17".parse().unwrap(), amount: -3000.0 },
];

 assert_eq!(0.1635371584432641, compute(&payments).unwrap());

Dependencies

~1MB
~18K SLoC