wareki converts between Japanese calendar and western calendar.
wareki converts between Japanese calendar and western calendar.
When converting from the Western calendar to the Japanese calendar, the era of the Japanese calendar is automatically determined according to the Western calendar. The year of Western calendar can be omitted and the default value is the system date.
By default, the Japanese era is output with one uppercase letter (e.g. R) but can also be output with kanji (e.g. 令和)
You can also convert from Japanese calendar to Western calendar by specifying an option.
wareki support Reiwa, Heisei, Taisho, Meiji.
$ date "+%Y/%m/%d"
2019/05/01
$ wareki
R1
$ wareki --kanji
令和1
$ wareki 2018
H30
$ wareki 2019/05/01
R1
$ wareki 2019/04/30
H31
$ wareki --reiwa 1
2019
$ wareki --heisei 1
1989
$ wareki --heisei 1
1989
$ wareki --showa 1
1926
$ wareki --help
# ...
Or, you can use Docker.
$ date "+%Y/%m/%d"
2019/05/01
$ docker container run --rm ebc2in2crc/wareki
R1
$ docker container run --rm ebc2in2crc/wareki --kanji
令和1
$ go get -u github.com/ebc-2in2crc/wareki/...
Download from the following url.
Or, you can use Homebrew (Only macOS).
$ brew tap ebc-2in2crc/wareki
$ brew install wareki
Or, you can use Docker.
$ docker pull ebc2in2crc/wareki
Content type
Image
Digest
sha256:ac0fd1ccb…
Size
7.9 MB
Last updated
over 3 years ago
docker pull ebc2in2crc/wareki