Other languages: Chinese, English.
The Emperor will abdicate on April 30, 2019, and the Crown Prince will ascend to the throne on May 1, 2019, and a new era name will be adopted. The Heisei era will end after 30 years and four months.
On the other hand, the calculations when converting the Japanese calendar (era name) to the Western calendar are troublesome. This repository is an easy way to support bidirectional conversion between the Japanese calendar (all era names) and the Western calendar (including the new era name Reiwa 04/04/2019 10:11).
wareki - seireki - hennkou
+
|
+ -- java-version
| |
| + -- jp.sekito.conversion
| |
| + -- Seireki2WarekiConversion.java(西暦から和暦に変更するクラス)
| | |
| | + -- 日付形式(西暦)が正しいかどうかを判断する checkDate()
| | + -- 期日を変えることができるかどうかを判断する isDate()
| | + -- 西暦から和暦に変更する warekiConversionApater()
| |
| + -- Wareki2SeirekiConversion.java(和暦から西暦に変更するクラス)
| |
| + -- 日付形式(和暦)が正しいかどうかを判断する checkDate()
| + -- 和暦から西暦に変更する seirekiConversionApater()
| + -- 和暦変換(元年) WarekigannenConversionMain()
| + -- 期日を変えることができるかどうかを判断する isDate()
| + -- どの和暦か数値で取得する warekiCheck()
| + -- 和暦存在チェック warekiExistenceCheck()
| + -- 和暦存在チェック(元年)warekiGannenExistenceCheck()
|
+ -- csharp-version
|
+ -- vb-version
Year interval:
Meiji: January 1, 1868 - July 29, 1912 Taisho: July 30, 1912 - December 24, 1926 Showa: December 25, 1926 - January 7, 1989 Heisei: January 1989 From 08th month onwards April 30, 2019 Reiwa: From May 1, 1989
[Conversion formula to Japanese calendar]
*(Western calendar → Reiwa) "Reiwa" = "Western calendar" – 2018
*(Western calendar → Heisei) "Heisei" = "Western calendar" – 1988
*(Western calendar → Showa) "Showa" = "Western calendar" – 1925
*(Western calendar → Taisho) "Taisho" = "Western calendar" – 1911
*(Western calendar → Meiji) "Meiji" = "Western calendar" – 1867
[Conversion formula to Western calendar]
*(Reiwa → Western calendar) "Western calendar" = "Reiwa" + 2018
*(Heisei → Western calendar) "Western calendar" = "Heisei" + 1988
*(Showa → Western calendar) "Western calendar" = "Showa" + 1925
*(Taisho → Western calendar) "Western calendar" = "Taisho" + 1911
*(Meiji → Western calendar) "Western calendar" = "Meiji" + 1867
From the Western calendar to the Japanese calendar
Input: yyyy/MM/dd, yyyy/M/d
Output: MM year dd month of 〇〇, M month d of 〇〇
From the Japanese calendar to the Western calendar
Input: MM year dd month of 〇〇, M month d of 〇〇
Output: yyyy/MM/dd, yyyy/M/d
Licensed under the MIT License.
bluetata/[email protected]