1 unstable release
new 0.2.2 | Feb 1, 2025 |
---|
#5 in #tracked
Used in 7 crates
(2 directly)
42KB
135 lines
tktax-year
Overview
tktax-year
is a Rust library that provides an enumeration, TrackedYear
, for representing and handling different calendar years relevant to a tax-oriented workflow. It is designed for robust, production-grade usage and can be easily integrated into broader financial or compliance systems.
Features include:
- Enumerated Year Options: Comprehensive enumeration of years, allowing for strong type guarantees.
- Production-Ready Design: Emphasizes safe error handling and convenient default behavior.
- Efficient and Minimal: Implements lightweight logic that compiles quickly and performs reliably.
Usage
Add the following to your Cargo.toml
:
[dependencies]
tktax-year = "0.1.0"
In your Rust code:
use tktax_year::TrackedYear;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let current_year = TrackedYear::default();
// default is TrackedYear::Twenty24
println!("The tracked year is: {}", current_year.value());
Ok(())
}
Contributing
Contributions are welcome! Please open issues or submit pull requests on the GitHub repository.
License
This project is licensed under the MIT License.
Dependencies
~26–37MB
~641K SLoC