Crates.io | erajp |
lib.rs | erajp |
version | 0.3.0 |
source | src |
created_at | 2019-01-14 09:45:07.727699 |
updated_at | 2020-01-12 04:44:35.634035 |
description | Japanese era converter for Rust |
homepage | |
repository | https://github.com/thara/erajp |
max_upload_size | |
id | 108480 |
size | 15,154 |
Japanese era converter for Rust.
Inspired by mattn/go-erajp.
Convert a year to Japanese era.
assert_eq!(Some("令和"), erajp::to_era_from_year(2019));
Convert a day to Japanese era (using chrono)
extern crate chrono;
use chrono::prelude::*;
let today = Local::today();
assert_eq!(Some("平成"), erajp::to_era(&today));
MIT
Tomochika Hara (a.k.a. thara)