#converter

thai-year-conv

A library for converting between Christian (AD) and Buddhist (BE) years

2 releases

Uses old Rust 2015

0.1.1 Jul 14, 2024
0.1.0 Jul 14, 2024

#58 in #converter

Download history 159/week @ 2024-07-10 24/week @ 2024-07-17 1/week @ 2024-07-24 11/week @ 2024-09-11 6/week @ 2024-09-18 21/week @ 2024-09-25 17/week @ 2024-10-02

55 downloads per month

MIT license

4KB

Thai Year Converter

A Rust library for converting between Christian (AD) and Buddhist (BE) years.

Usage

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);
}

No runtime deps