Skip to content

thara/erajp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

erajp

Japanese era converter for Rust.

Inspired by mattn/go-erajp.

Examples

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

License

MIT

Author

Tomochika Hara (a.k.a. thara)

About

Japanese era converter for Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages