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

#5 in #libre-office

Download history 1/week @ 2024-03-09 17/week @ 2024-03-30 22/week @ 2024-04-06 3/week @ 2024-04-13 2/week @ 2024-05-11 2/week @ 2024-05-25

95 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