Crates.io | thai_year_converter |
lib.rs | thai_year_converter |
version | 0.1.0 |
source | src |
created_at | 2024-07-14 14:07:15.384927 |
updated_at | 2024-07-14 14:07:15.384927 |
description | A library for converting between Christian (AD) and Buddhist (BE) years |
homepage | https://github.com/bombman/thai_year_converter |
repository | https://github.com/bomaman/thai_year_converter |
max_upload_size | |
id | 1303017 |
size | 3,274 |
A Rust library for converting between Christian (AD) and Buddhist (BE) years.
Add this to your Cargo.toml
:
[dependencies]
thai_year_converter = "0.1.0"
use thai_year_converter::{Year, YearConversion};
fn main() {
let buddhist_year = Year::new(2024).to_buddhist_year();
let christian_year = Year::new(2567).to_christian_year();
println!("buddhist_year: {}", buddhist_year);
println!("christian_year: {}", christian_year);
}