| Crates.io | income-tax |
| lib.rs | income-tax |
| version | 0.2.0 |
| created_at | 2024-12-02 13:21:46.49352+00 |
| updated_at | 2024-12-02 13:40:49.667615+00 |
| description | Income tax calculations |
| homepage | https://github.com/sunsided/income-tax-rs |
| repository | https://github.com/sunsided/income-tax-rs |
| max_upload_size | |
| id | 1468634 |
| size | 29,405 |
This Rust crate provides functionality for income tax calculation in different years. It is currently aimed at German income tax but is welcome to additions for different countries and years.
use income_tax::{IncomeTax, germany};
fn germany_2024() {
let tax = germany::IncomeTax2024;
let net_income = tax.calculate(70_000.0);
assert_eq!(net_income, Ok(18_797.0));
let refund = tax.tax_refund(100_000.0, 50_000.0);
assert_eq!(refund, Ok(20_491.0));
}