Skip to content

A utility to print both Western and Japanese calendar year

License

Notifications You must be signed in to change notification settings

kenichi-asai/nendo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nendo

指定した日の西暦、和暦、年度を表示するプログラム

インストール

opam pin add nendo https://github.com/kenichi-asai/nendo.git

Usage

$ nendo --help
Usage: nendo [[M|T|S|H|R] year [month [day]]]

使用法

$ nendo
2020 年(令和 2 年)5 月 16 日(令和 2 年度)

引数なしで呼び出すと、今日の日付をフルフォーマットで表示する。

$ nendo 2019 2 10
2019 年(令和 1 年)2 月 10 日(平成 30 年度)

年、月、日を引数に渡すと、その日をフルフォーマットで表示する。 3月までは前年度となる。

$ nendo 2019 2
2019 年(令和 1 年)2 月(平成 30 年度)

日付を省略すると、日付以外を表示する。

$ nendo 2018
2018 年(平成 30 年)

月を省略すると、年度表示も表示されなくなる。 (3月までか4月以降かによってずれるため。)

$ nendo showa 42
1967 年(昭和 42 年)

元号を第1引数に入れることができる。 元号は、最初の一文字のみで判定。 サポートしているのは M, T, S, H, R。 大文字でも小文字でも良い。

$ nendo H 20 5
2008 年(平成 20 年)5 月(平成 20 年度)

月を入れると年度表示が復活する。

$ nendo r 2 3 14
2020 年(令和 2 年)3 月 14 日(令和 1 年度)

日を入れても良い。

サポートしている年

$ nendo 1600
明治 1 年(1868 年)4 月以降のみサポートしています

更新履歴

  • 0.1 (May 16, 2020) 初期バージョンを公開

About

A utility to print both Western and Japanese calendar year

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages