Crates.io | thai-year-conv |
lib.rs | thai-year-conv |
version | 0.1.1 |
source | src |
created_at | 2024-07-14 15:22:38.389844 |
updated_at | 2024-07-14 15:32:41.824465 |
description | A library for converting between Christian (AD) and Buddhist (BE) years |
homepage | https://github.com/bombman/thai-year-conv |
repository | https://github.com/bombman/thai-year-conv |
max_upload_size | |
id | 1303070 |
size | 3,290 |
A Rust library for converting between Christian (AD) and Buddhist (BE) years.
Documentation = "https://docs.rs/thai-year-conv"
Add this to your Cargo.toml
:
[dependencies]
thai-year-conv = "0.1.1"
use thai_year_conv::{Year, YearConversion};
fn main() {
let buddhist_year = Year::new(2024).to_buddhist_year();
let christian_year = Year::new(2557).to_christian_year();
println!("buddhist_year {}", buddhist_year);
println!("christian_year {}", christian_year);
}